mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-14 20:35:47 +01:00
18 lines
447 B
JavaScript
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);
|