Files
jquery-validation-mirror/test/custom-elements.js
2024-06-28 16:10:19 +01:00

18 lines
447 B
JavaScript

class CustomTextElement extends HTMLElement {
static formAssociated = true;
static observedAttributes = ["name", "id"];
constructor() {
super();
this.internals_ = this.attachInternals();
}
get form() {
return this.internals_ != null ? this.internals_.form : null;
}
get name() {
return this.getAttribute("name");
}
}
window.customElements.define("custom-text", CustomTextElement);