Skip to content

Instantly share code, notes, and snippets.

@ashwinkumar2438
Last active January 15, 2023 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ashwinkumar2438/f3e763757a78a2e5096c2d2e8eddd28b to your computer and use it in GitHub Desktop.
Save ashwinkumar2438/f3e763757a78a2e5096c2d2e8eddd28b to your computer and use it in GitHub Desktop.
//defining autonomous custom elements:
if(!customElements.get('my-element')){
customElements.define('my-element',MyElement);
}
//defining customised button element:
if(!customElements.get('custom-button')){
customElements.define('custom-button',CustomButton,{extends:'button'})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment