[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 #8 from Dominic Cooney <dominicc@chromium.org> ---
(In reply to comment #7)
> Given that we don't have constructors for all elements yet, isn't this a bit
> soon? Some of this might belong in DOM, given how createElement() /
> createElementNS() work.

This could just return the closest available constructor, for example

HTMLElement.getConstructorForTag('ins') === HTMLModElement

> As noted elsewhere, createElement("audio") and new Audio() do different
> things, is that something we want to keep, or are we moving away from that?

Scott mentioned he wants to mint prototype chains, so I guess
HTMLElement.getConstructorForTag('img') === HTMLImageElement.prototype and not
Image.prototype?

Alternatively, does making this getPrototypeForTag instead of
getConstructorForTag address some concerns?

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

Received on Friday, 21 June 2013 08:23:24 UTC