MCPcopy Create free account
hub / github.com/docusealco/docuseal /

Class

app/javascript/elements/toggle_submit.js:1–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1export default class extends HTMLElement {
2 connectedCallback () {
3 this.button.disabled = false
4
5 this.form.addEventListener('submit', () => {
6 this.button.disabled = true
7 })
8 }
9
10 disconnectedCallback () {
11 this.button.disabled = false
12 }
13
14 get button () {
15 return this.querySelector('[type="submit"]')
16 }
17
18 get form () {
19 return this.querySelector('form') || this.closest('form')
20 }
21}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected