Commit 4e2c16b
Return the newly created HtmlElement class, as opposed to just "undef… (#91)
* Return the newly created HtmlElement class, as opposed to just "undefined"
Currently `register` returns the result of `customElements.define`, which happens to be undefined.
While it is possible to get the just defined tab right away, it would make sense to return the newly create HtmlElement class instead.
```js
const klass = register(Component, 'element-tag');
```
vs
```js
register(Component, 'element-tag');
const klass = customElements.get('element-tag');
```
* feat: Add types
---------
Co-authored-by: Ryan Christian <[email protected]>1 parent e277fd0 commit 4e2c16b
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
0 commit comments