A Pen by DEWITTE Pierre-Alban on CodePen.
Last active
December 27, 2018 13:28
-
-
Save padewitte/9ce76de27ddd825b0e0bce249300acb7 to your computer and use it in GitHub Desktop.
basic-vanilla-custom-element
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
<basic-vanilla-custom-element></basic-vanilla-custom-element> |
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
customElements.define('basic-vanilla-custom-element', class extends HTMLElement { | |
connectedCallback() { | |
this.innerHTML = "<b>I'm an basic custom element defined in vanilla JS!</b>"; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment