[whatwg] innerHTML in HTML documents with multiple namespaces
Thomas Broyer
t.broyer at gmail.com
Tue Mar 27 07:39:05 PDT 2007
Hi,
As announced on the WHATWG-Implementors list, I've done some
preliminary work on HTML5 serializers for Kid and Genshi templating
engines. I'm basing on the algorithm for getting the innerHTML value
<http://www.whatwg.org/specs/web-apps/current-work/#innerhtml0>
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)?
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>")
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 ;-)
--
Thomas Broyer
More information about the whatwg
mailing list