Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Last active July 7, 2019 13:07
Show Gist options
  • Save indreklasn/812cd39c6ed8147b29a9f10de7d4adef to your computer and use it in GitHub Desktop.
Save indreklasn/812cd39c6ed8147b29a9f10de7d4adef to your computer and use it in GitHub Desktop.
class WebComponentButton extends HTMLElement {
// The connectedCallback() runs each time the element is added to the DOM
connectedCallback() {}
// Called every time the element is removed from the DOM. Useful for running clean up code.
disconnectedCallback() {}
//When the element is either removed from the DOM, or moved to a different page:
adoptedCallback() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment