Skip to content

Instantly share code, notes, and snippets.

@padewitte
Last active December 27, 2018 13:28
Show Gist options
  • Select an option

  • Save padewitte/9ce76de27ddd825b0e0bce249300acb7 to your computer and use it in GitHub Desktop.

Select an option

Save padewitte/9ce76de27ddd825b0e0bce249300acb7 to your computer and use it in GitHub Desktop.
basic-vanilla-custom-element
<basic-vanilla-custom-element></basic-vanilla-custom-element>
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