[Bug 22343] [Custom]: Need a function to retrieve a constructor (or prototype) by localName

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22343

--- Comment #2 from Scott Miles <sjmiles@chromium.org> ---
> What does it do if there's no such tag? ... Return HTMLUnknownElement?

Returning HTMLUnknownElement seems like the right choice, since this is what I
get if I document.createElement with the same input.

> What about accessing SVG element constructors?

I don't know the ins and outs here.

> Just out of curiosity--why constructors and not prototypes?

The vague notion that the prototype is in service of the constructor, so
'constructor' is driving the bus. For example, it feels more reliable to
evaluate 'constructor.prototype' then 'prototype.constructor', and it's easier
to compare against known objects (e.g. HTMLImageElement).

For my particular use case, I only actually want the prototype.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 13 June 2013 22:16:08 UTC