Created
May 5, 2021 12:20
-
-
Save smpnjn/7c328bbe586a0aedfe5543d61185432d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Paragraph extends HTMLElement { | |
constructor() { | |
super() | |
this.innerHTML = '<p>Hello</p>' | |
} | |
} | |
// define adds a custom element "alpha-paragraph" using the rules defined in the "Paragraph" class | |
customElements.define('alpha-paragraph', Paragraph); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment