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

This is not about Web becoming inflexible.  This is about using `[NewTarget]` internal slot.  `new HTMLElement` doesn't because `localName` cannot be determined inside `HTMLElement`'s constructor.

I've made a number of suggestions to solve this problem, one of which was about passing the local name from `createElement`, custom element's constructor, and then to `HTMLElement`.  In this world, we can do the reverse lookup from the local name to the constructor object, and construct the element.  However, this approach allows an inconsistency between the the actual constructor of `HTMLElement`'s constructor and what `HTMLElement`'s constructor ends up creating.  Furthermore, it requires the `HTMLElement`'s constructor to be called with the local name as an argument, which many people argued are unnecessary and ugly.  Optionally allowing this would mean that the behavior of `HTMLElement`'s constructor would flip between two modes, which is also not ideal.

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

Received on Monday, 2 January 2017 23:26:17 UTC