File: custom-elements.js

package info (click to toggle)
node-jquery-validation 1.21.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,388 kB
  • sloc: javascript: 8,943; php: 29; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 447 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);