[whatwg] innerHTML in HTML documents with multiple namespaces

On Tue, 27 Mar 2007, Thomas Broyer wrote:
> 
> I'm actually wondering what is supposed to be "tag name" for an element 
> which is not in the HTML namespace (e.g. created with 
> document.createElementNS). Is it the localName or the tagName (qualified 
> name, i.e. with prefix)?

The tag name is fully qualified (as in tagName).

> In other words, what should document.body.innerHTML end with after this
> script:
> var svg_svg = document.createElementNS("http://www.w3.org/2000/svg",
> "svg:svg");
> document.body.appendChild(svg_svg);
> 
> Should it end with "<svg></svg>" or "<svg:svg></svg:svg>"? (Firefox
> would have "<svg></svg>")

The spec requires the latter at the moment.


> Also, should the "tag name" be lowercased before inclusion in the output 
> or the algorithm is just assuming the "tag name" of HTML elements have 
> already been lowercased elsewhere? (Firefox keeps uppercase letters; 
> elements created with document.createElement are HTMLElements and have 
> their names lowercased at creation time; as described in the spec)
> 
> Same questions with attribute names ;-)

I think the spec has been clarified regarding this, let me know if it is 
not clear still.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 18 June 2007 23:49:44 UTC