It seems that there's some additional reasoning that needs to go into
whether an element could be constructed as custom tag. Like in this
case, it should work both as a custom tag and as a type extension (the
"is" attr).


On Tue, Feb 19, 2013 at 10:13 PM, Daniel Buchner <> wrote:
> Nope, you're 100% right, I saw header and thought HTMLHeadingElement for
> some reason - so this seems like a valid concern. What are the
> mitigation/solution options we can present to developers for this case?
> Daniel J. Buchner
> Product Manager, Developer Ecosystem
> Mozilla Corporation
> On Tue, Feb 19, 2013 at 9:17 PM, Scott Miles <> wrote:
>> Perhaps I'm making a mistake, but there is no specific prototype for the
>> native header element. 'header', 'footer', 'section', e.g., are all
>> HTMLElement, so all I can do is
>> FancyHeaderPrototype = Object.create(HTMLElement.prototype);
>> Afaict, the 'headerness' cannot be expressed this way.
>> On Tue, Feb 19, 2013 at 8:34 PM, Daniel Buchner <>
>> wrote:
>>> Wait a sec, perhaps I've missed something, but in your example you never
>>> extend the actual native header element, was that on purpose? I was under
>>> the impression you still needed to inherit from it in the prototype
>>> creation/registration phase, is that not true?
>>> On Feb 19, 2013 8:26 PM, "Scott Miles" <> wrote:
>>>> Question: if I do
>>>> FancyHeaderPrototype = Object.create(HTMLElement.prototype);
>>>> document.register('fancy-header', {
>>>>   prototype: FancyHeaderPrototype
>>>> ...
>>>> In this case, I intend to extend "header". I expect my custom elements
>>>> to look like <header is="fancy-header">, but how does the system know what
>>>> localName to use? I believe the notion was that the localName would be
>>>> inferred from the prototype, but there are various semantic tags that share
>>>> prototypes, so it seems ambiguous in these cases.
>>>> S

Reply via email to