- From: Joseph Orbegoso Pea <notifications@github.com>
- Date: Sat, 24 Dec 2016 12:59:01 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 24 December 2016 20:59:27 UTC
First, ES6 classes have a ugly static limitations (permanently engrained `super` references), and now we can't use ES5 classes in custom elements? What if we generate those classes from a class library? This is not ideal. The following should NOT give an error:
```js
function BarBar() { console.log('hello') }
BarBar.prototype = Object.create(HTMLElement.prototype)
customElements.define('bar-bar', BarBar)
document.createElement('bar-bar')
```
Output:
```
hello
Uncaught TypeError: Failed to execute 'createElement' on 'Document': The result must implement HTMLElement interface
```
Honestly, why?
--
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-269100188
Received on Saturday, 24 December 2016 20:59:27 UTC