W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2007

[whatwg] innerHTML in HTML documents with multiple namespaces

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 19 Jun 2007 06:49:44 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.0706190648440.26929@dhalsim.dreamhost.com>
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.

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:56 UTC