W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: ES6 and upgrading custom elements

From: Dimitri Glazkov <dglazkov@google.com>
Date: Tue, 6 Jan 2015 10:54:38 -0800
Message-ID: <CADh5Ky3yOaU_RZUj9aXbLBDZkhgNMmfhav3wqN_8H+9PDHPsqw@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WebApps WG <public-webapps@w3.org>
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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC