Skip to content

Instantly share code, notes, and snippets.

@MariusBongarts
Last active May 26, 2022 17:37
Show Gist options
  • Select an option

  • Save MariusBongarts/47507e554476dde29630ab43f612f0fa to your computer and use it in GitHub Desktop.

Select an option

Save MariusBongarts/47507e554476dde29630ab43f612f0fa to your computer and use it in GitHub Desktop.
HelloWorldComponent
class HelloWorldComponent extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.innerHTML = `<h1>Hello world!</h1>`
}
}
customElements.define("hello-world", HelloWorldComponent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment