Re: ES6 and upgrading custom elements

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

> On Tue, Jan 6, 2015 at 7:06 PM, Dimitri Glazkov <dglazkov@google.com>
> wrote:
> > Yes to the first question. I wasn't planning on doing anything different
> > there.
>
> It seems simple prototype munging but not actually changing identity
> will fail for all but the basic cases of subclassing. E.g. if I
> subclass an HTMLInputElement I would expect it to have an internal
> [[value]] slot of sorts, but since the element created is a plain
> HTMLElement whose prototype is munged that will not be the case.
>

Right, that's why to create a valid custom element that subclasses
HTMLInputElement, you should use type extensions. With type extensions, the
HTMLInputElement is what's instantiated.

:DG<

Received on Tuesday, 6 January 2015 18:55:05 UTC