W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: HTMLElement.register--giving components tag names

From: Erik Arvidsson <arv@chromium.org>
Date: Wed, 31 Aug 2011 13:38:36 -0700
Message-ID: <CAJ8+Gog1Ce8T7-A+cF=sEyTDev_=vYHQCJk3i_ssNtqjugAbjQ@mail.gmail.com>
To: Dominic Cooney <dominicc@chromium.org>
Cc: WebApps WG <public-webapps@w3.org>
On Tue, Aug 30, 2011 at 22:33, Dominic Cooney <dominicc@chromium.org> wrote:

> You will notice that this says nothing about how prototypes are wired
> up. It should. Maybe the argument to extend should have an optional
> second field, proto, that specifies the new methods/getters/setters
> that ContactPicker's prototype should introduce.
> This is not a general subtyping mechanism! It is only designed for
> setting up subtypes of HTMLElement for use with register. When
> ECMAScript and the DOM bindings are sufficiently aligned,
> HTMLElement.register can be opened up to accept constructors defined
> using ordinary ECMAScript mechanisms for subtyping DOM interfaces.
> Scripts can continue to use extend (it is pretty succinct) or
> constructors set up their own way.

Providing a prototype is important.

For example I can imagine UI toolkits providing their own "base class"
that all the custom elements extend.

Also, it seems essential to allow extending other things than just HTMLElement.

Received on Wednesday, 31 August 2011 20:39:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 14:36:53 UTC