Will any new features be tied to constructors?

Anne van Kesteren annevk at annevk.nl
Wed Jul 1 14:00:06 UTC 2015


On Wed, Jul 1, 2015 at 3:49 PM, Domenic Denicola <d at domenic.me> wrote:
> From: Anne van Kesteren [mailto:annevk at annevk.nl]
>> In a world where custom elements are normal subclassed objects, they would just call super() from the constructor to set the browser-supplied bits and then add whatever else is needed themselves.
>
> Yes, that is the Dmitry proposal.

This is confusing. The Element.create callback from Dmitry can also be
called post-construction, so it's strictly different from most
subclassing scenarios.


> Apparently Kevin and Allen's private state proposal is based on private state being installed at allocation time, so yes, since super() fully allocates the object, this would prevent private state for custom elements.

So are you saying that would make private state harder to use for any
kind of subclassing scenario?


-- 
https://annevankesteren.nl/


More information about the es-discuss mailing list