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

@rniwa it takes `new MyElement();` to fail with an `illegal constructor` error and the problem with babel is that even if you have that `this._id` set during constructor invokation, any other method defined in the class won't be inherited so no, your one does not seem to be a solution.

To summarize the issue:

```js
class List extends Array {
  constructor() {
    super();
    this._id = 1;
  }
  method() {}
}

console.log((new List).method); // undefined
```

It doesn't matter if you have set something in the constructor if everything else is unusable 

-- 
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-254337861

Received on Monday, 17 October 2016 21:22:17 UTC