Skip to content

Commit

Permalink
Better class name for custom element.
Browse files Browse the repository at this point in the history
  • Loading branch information
treshugart committed Mar 20, 2019
1 parent 2a8507a commit 9079c69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ You can also use your web component constructor instead of the name that was pas

```js
// So we have the reference to pass to h().
class WebComponent extends HTMLElement {}
class CustomElement extends HTMLElement {}

// It must be defined first.
customElements.define("web-component", WebComponent);
customElements.define("custom-element", CustomElement);

// Now we can use it.
h(WebComponent);
h(CustomElement);
```

0 comments on commit 9079c69

Please sign in to comment.