Re: ES6 and upgrading custom elements

On Tue, Jan 6, 2015 at 9:56 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Tue, Jan 6, 2015 at 6:13 PM, Dimitri Glazkov <dglazkov@google.com>
> wrote:
> > That section needs to be updated, because the ES6 spec had shifted a
> little
> > bit with regard to @@create. Filed
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=27769.
>
> Yeah, there's issues in general there, such as ES6 giving up on
> explaining all of DOM :-(
>
>
> > Conceptually, when I wrote it I'd imagined that the constructor will be
> > called only when you explicitly invoke it (new FooElement...). When
> parsing
> > or upgrading, the constructor would not be called. The createdCallback
> will
> > be invoked in either case.
>
> Would you do the prototype munging that is specified in
> "createdCallback" today? (I think it would be more clear if we made
> that prototype munging part of the upgrade algorithm by the way.) How
> else would that work? Pass a reference to the old element and let the
> developer handle it?
>

Yes to the first question. I wasn't planning on doing anything different
there. And yes, I would like to fix the munging clarity as part of
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27437.

:DG<


>
>
> --
> https://annevankesteren.nl/
>

Received on Tuesday, 6 January 2015 18:06:34 UTC