This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The spec says: Element.tagName, Node.nodeName, and Node.localName These attributes must return tag names converted to uppercase and attribute names converted to lowercase, regardless of the case with which they were created. I can understand that elements need to be converted to uppercase, but can't attribute names be left alone? At least Firefox, Opera and Safari do so: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cscript%3Edocument.documentElement.setAttributeNS(null%2C%20%27Foo%27%2C%20%27bar%27)%3B%0Adocument.write(document.documentElement.attributes[0].nodeName)%3C%2Fscript%3E
However, the following gives it in lowercase in Firefox and Safari, and in the original case in Opera: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cscript%3Edocument.documentElement.setAttribute('Foo'%2C%20'bar')%3B%0Adocument.write(document.documentElement.attributes%5B0%5D.nodeName)%3C%2Fscript%3E
Yeah but that's because setAttribute() lowercases -- not .nodeName.
If at all possible considering existing content, I'd love to see Element.localName not upper casing, since not uppercasing would provide for performant code that runs on both HTML and XHTML DOMs.
ok. IE doesn't support it anyway.