1import { Controller } from "@hotwired/stimulus" 2 3// Connects to data-controller="offering-preview" 4export default class extends Controller { 5 static targets = [ "iframe", "bannerStyle", "bannerBackgroundColor", "ctaButtonColor" ] 6 7 loadPreview() { 8 const bannerStyle = this.bannerStyleTarget.value; 9 const bannerBackgroundColor = this.bannerBackgroundColorTarget.value; 10 const ctaButtonColor = this.ctaButtonColorTarget.value; 11 12 const url = new URL(this.element.dataset.previewUrl); 13 url.searchParams.set("page_banner_style", bannerStyle); 14 url.searchParams.set("page_banner_background_color", bannerBackgroundColor); 15 url.searchParams.set("page_cta_button_color", ctaButtonColor); 16 url.searchParams.set("preview", "true"); 17 this.iframeTarget.src = url.toString(); 18 } 19}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.