-
-
Save web-padawan/c824dc3a2064517ceb942b154e7bb1c7 to your computer and use it in GitHub Desktop.
This file contains 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
class MyElement extends HTMLElement { | |
connectedCallback(): void { | |
this.textContent = 'Hello'; | |
} | |
} | |
customElements.define('my-element', MyElement); | |
declare global { | |
interface HTMLElementTagNameMap { | |
'my-element': MyElement; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment