| 1 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected