PageSourceSearch

https://www.carwow.co.uk/assets/controllers/persist_modal_value_controller-d729f7f7.js

js carwow.co.uk collected 2026-10-01 10:43:17 UTC 579 bytes, 21 lines download raw bytes

1import { Controller } from '@hotwired/stimulus'
2
3export default class extends Controller {
4  static targets = ['modalValue', 'modal', 'modalOpener']
5
6  connect () {
7    this.modalValueTargets.forEach(target => {
8      target.addEventListener('click', this.setFormValue.bind(this))
9    })
10  }
11
12  setFormValue (e) {
13    this.modalOpenerTarget.value = e.target.value
14    this.modalOpenerTarget.checked = true
15    this.modalOpenerTarget.dispatchEvent(new Event('change', { bubbles: true }))
16  }
17
18  closeModal () {
19    this.modalTarget.parentElement.setAttribute('open', false)
20  }
21}

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.