From: Anne van Kesteren [mailto:[email protected]] 

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

> Or are you saying that super() would fully allocate the object

Yes, that is how ES2015 works.

> and prevent adding new private state

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.

Personally I think this is a definite negative for any such private state 
proposal, since it makes it significantly less expressive than weak maps. But I 
suppose when the proposal is proposed, we will have that discussion.

> (or other features tied to constructors)?

Well, it depends on if those features are tied to allocation (like this private 
state proposal) or to initialization.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to