erik.arvidsson at gmail.com
Wed Jun 18 12:00:24 PDT 2014
On Wed, Jun 18, 2014 at 2:54 PM, Domenic Denicola <
domenic at domenicdenicola.com> wrote:
> From: Brendan Eich <brendan at mozilla.org>
> > This all looks at the past, where the DOM is warty as hell (I can say
> that, I started it). What about the future?
> Much the same, from what I understand. The parser needs to be able to
> create elements, including custom elements, without knowing what their
> constructor signature is. As specced , registering the element will set
> its @@create value to something that creates the element in this way, and
> presumably the parser will be updated to invoke @@create. (This is the same
> as how, in ES5, the parser invokes the `createdCallback` property passed to
> Dmitri, did I get that right?
Channeling Dimitri here since I designed that part...
The important part for Custom Elements is that @@create is non
configurable, non writable so that we can use a native implementation that
sets up all the internal wrapper pointers and whatnot. This is so that the
parser does not have to call into user code at parse time.
However, this still allows user code to provide a constructor that gets
invoked when doing `new MyCustomElement(x, y, z)`.
> : https://w3c.github.io/webcomponents/spec/custom/#es6
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss