Created
August 6, 2017 17:42
-
-
Save enjikaka/5412e5ae6a8b9511194ef48c3148dd64 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 TemplateComponent extends HTMLElement { | |
| constructor (tagName) { | |
| super(); | |
| if (!tagName) { | |
| throw new Error('You did now specify a tag name. You need to call super with the tag name in you constructor.'); | |
| } | |
| this._tagName = tagName; | |
| } | |
| connectedCallback () { | |
| this.render(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment