review fixes

This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:18 +03:00
1 parent d071e8c429
commit e11f4bddbe
40 files changed
+299 -192

No files matched your search

+14 -6
View File
@@ -1,5 +1,19 @@
export default class extends HTMLElement {
connectedCallback () {
if (this.lastElementChild) {
this.init()
} else {
queueMicrotask(() => this.init())
}
}
disconnectedCallback () {
if (this.interval) {
clearInterval(this.interval)
}
}
init () {
const form = this.querySelector('form') || (this.querySelector('input, button, select') || this.lastElementChild).form
if (this.dataset.interval) {
@@ -24,10 +38,4 @@ export default class extends HTMLElement {
form.requestSubmit()
}
}
disconnectedCallback () {
if (this.interval) {
clearInterval(this.interval)
}
}
}