@@new
Erik Arvidsson
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 [1], 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
> `registerElement`.)
>
> 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)`.
>
> [1]: https://w3c.github.io/webcomponents/spec/custom/#es6
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
--
erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140618/d9600b8c/attachment.html>
More information about the es-discuss
mailing list