Re: [webcomponents] Inheritance in Custom Elements (Was Proposal for Cross Origin Use Case and Declarative Syntax)

On Tue, Dec 10, 2013 at 11:15 AM, Anne van Kesteren <>wrote:

> On Tue, Dec 10, 2013 at 4:10 PM, Domenic Denicola
> <> wrote:
> > Nevertheless, it would be unfortunate to use the in-progress nature of
> making the web platform more JavaScript-friendly as an argument for making
> it more JavaScript hostile (by prohibiting element subclassing).
> Well, the question is more what we should focus on first and whether
> doing it in the wrong order will be future hostile. I'm also somewhat
> skeptical that if we don't go through the exercise of explaining a
> couple of existing elements first, the generic mechanism they are all
> supposed to end up with will be correct.

I agree and have previously sketched how large parts of document.register
can be made to work with @@create without adding anything to the platform
(besides @@create). The things that are still magic are the lifetime
callbacks and how the parser first creates the JS objects.

We carefully crafted document.register with ES6 classes in mind. It is not
a coincidence that both constructor functions and the dict used today ind
doc.reg have a prototype property.


Received on Tuesday, 10 December 2013 17:20:53 UTC