IMPR: form/field validation better memory cleaning

This commit is contained in:
Tony Air 2024-06-26 03:49:46 +02:00
parent 52cade10c8
commit 707e5e1721
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class ValidateField {
this.#field.removeEventListener('change', this.validate) this.#field.removeEventListener('change', this.validate)
this.#field.removeEventListener('focusout', this.validate) this.#field.removeEventListener('focusout', this.validate)
this.#field.ValidateField = null delete this.#field.ValidateField
this.#field.classList.remove(`${NAME}--active`) this.#field.classList.remove(`${NAME}--active`)
} }

View File

@ -115,7 +115,7 @@ class ValidateForm {
this.#form.removeEventListener('submit', this.submitHandler) this.#form.removeEventListener('submit', this.submitHandler)
this.#form.ValidateForm = null delete this.#form.ValidateForm
this.#form.classList.remove(`${NAME}--active`) this.#form.classList.remove(`${NAME}--active`)
} }
} }