This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title></title> | |
| <script src="element.js"></script> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ********************************************************** ACME_BaseClass | |
| class ACME_BaseClass extends HTMLElement { | |
| // ======================================================== ACME_BaseClass.$query | |
| $query( | |
| // selector is a DOM selector string eg. "div:not[id='1']" | |
| // if starts with * then return all elements as NodeList | |
| // if starts with ** then return all elements as Array | |
| selector, | |
| // optional 2nd parameter is the root element to query from | |
| root = this.shadowRoot || this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| customElements.define("", class extends HTMLElement { | |
| constructor() { | |
| super() | |
| .attachShadow({ mode: "open" }) | |
| .innerHTML = `<style></style>`; | |
| } | |
| connectedCallback() { | |
| this.innerHTML = ``; | |
| } | |
| }) |
OlderNewer