You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(An official example introduced here: https://skatejs.netlify.com/docs/element) Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
Source code on codesandbox. You can see the error on devtools console tab.
Expected behaviour
<x-hello></x-hello> element should render Helllo, !
The issue seems to occur because typescript compiles ES6 class to ES5 syntax.(Related issue)
I tried esnext build in skatejs monorepo which exports ES6 class and it worked.
The text was updated successfully, but these errors were encountered:
Bug report
@skatejs/element
0.0.1Current behaviour
Extending
Element
exported by@skatejs/element
triggers following error:(An official example introduced here: https://skatejs.netlify.com/docs/element)
Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
Source code on codesandbox. You can see the error on devtools console tab.
Expected behaviour
<x-hello></x-hello>
element should renderHelllo, !
The issue seems to occur because typescript compiles ES6 class to ES5 syntax.(Related issue)
I tried
esnext
build inskatejs
monorepo which exports ES6 class and it worked.The text was updated successfully, but these errors were encountered: