[Bug 20487] [Custom]: Creation of custom elements via createElement is underdefined

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

--- Comment #14 from Boris Zbarsky <bzbarsky@mit.edu> ---
> "If INTERFACE inherits from SVGElement and NAMESPACE is not SVG namespace,
> throw a NamespaceError and stop."

Oh, that part is just fine.  The problem is that in the very next step
NAMESPACE is completely ignored and the element is created in the HTML
namespace no matter what NAMESPACE was.  So if the incoming NAMESPACE is SVG
and the interface inherits from SVGElement we'll get to step 5 and happily
create ... an HTML element.

> WDYT, should we keep the same lackadaisical behavior for custom elements?
> For example, for a custom element "super-svg", that extends SVGSVGElement:
> 
> var superSvg1 = document.createElement('super-svg');
> 
> Should it:
> 
> a) throw NamespaceError

I would probably be OK with this.

> b) returns HTMLUnknownElement

I would be OK with this as long as the super-svg custom stuff is not applied to
it...

> c) returns the instance of "super-svg" custom element?

I would probably be OK with this one too.

Worth roping in Anne to see what his thoughts are on createElement here.

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

Received on Thursday, 31 January 2013 02:35:32 UTC