[w3c/webcomponents] Invalid constructor when invoking the constructor directly (#531)

I tried to use the constructor variant as described in 2.1.1 Creating an autonomous custom element in current implementation of webcomponents.js / chrome:
```
const flagIcon = new FlagIcon()
flagIcon.country = "jp"
document.body.appendChild(flagIcon)
```

That currently throws `Invalid constructor`, because it tries to invoke the constructor of `HTMLElement`. Will the HTMLElement-constructor change in future, such that it will be callable? Are there any resources to read up on this?
For the moment, the way as described on [MDN](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements/Custom_Elements_with_Classes) works, when I use the constructor returned by `document.registerElement`. However, this implies, that I cannot use a Custom Element programmatically only (without assigning it a tag name) - is that correct or will it be possible in future to have unnamed custom elements (meaning a named ES6 class extending HTMLElement, but not having a tag name)?

---
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/531

Received on Monday, 11 July 2016 09:27:51 UTC