Skip to content

Instantly share code, notes, and snippets.

@enjikaka
Last active August 7, 2017 04:22
Show Gist options
  • Select an option

  • Save enjikaka/fb0946dd024613d61fe8c80ce644acf7 to your computer and use it in GitHub Desktop.

Select an option

Save enjikaka/fb0946dd024613d61fe8c80ce644acf7 to your computer and use it in GitHub Desktop.
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;
}
}
@TimvdLippe
Copy link
Copy Markdown

There is a typo in the message. now should be not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment