PageSourceSearch

https://blendswap.com/assets/controllers/toggle_switch_controller-cb84d2df.js

js blendswap.com collected 2026-09-24 20:37:41 UTC 337 bytes, 10 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Attach to a <form>. The switch input fires `change->toggle-switch#submit`,
4// which posts the form (PATCH) so the enabled flag persists. Degrades to a
5// normal submit button when JS is off.
6export default class extends Controller {
7  submit() {
8    this.element.requestSubmit()
9  }
10}

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.