Re: [w3c/webcomponents] Non-class based example of customElement.define() (#587)

> Because you're not using class constructor. this doesn't automatically get set to the result of calling super constructor (you're not even using super syntax so there's no way for the engine to figure this out).

Seems like the problem should've been fixed in the engine without changing how JS works on the outside. Don't say it isn't possible!

I find myself here again because now I have a Custom Element defined where the following is happening and is _very strange_:

```js
import MyElementClass from './my-el'

customElements.define('my-el', MyElementClass)

document.createElement('my-el') // works perfectly

new MyElementClass // TypeError: Illegal constructor
```

It works great in Chrome, Firefox, Safari, but I get this error in Electron spawned from Karma.

The problems are a

> ... never ending story!!!

@SerkanSipahi ☝️👍

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/587#issuecomment-443487849

Received on Sunday, 2 December 2018 07:34:42 UTC