[webcomponents]: HTMLElementElement missing a primitive

Currently, if I document.register something, it's my job to supply a
complete prototype.

For HTMLElementElement on the other hand, I supply a tag name to extend,
and the prototype containing the extensions, and the system works out the
complete prototype.

However, this ability of HTMLElementElement to construct a complete
prototype from a tag-name is not provided by any imperative API.

As I see it, there are three main choices:

1. HTMLElementElement is recast as a declarative form of document.register,
in which case it would have no 'extends' attribute, and you need to make
your own (complete) prototype.

2. We make a new API for 'construct prototype from a tag-name to extend and
a set of extensions'.

3. Make document.register work like HTMLElementElement does now (it takes a
tag-name and partial prototype).

Am I making sense? WDYT?

Scott

Received on Thursday, 7 March 2013 22:36:06 UTC