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 that Element.setAttribute() should lower case its argument. This is bad for SVG. Instead, the spec should say that in an HTML document, setAttribute, getAttribute and getAttributeNode on HTMLElement objects must lower case the attribute name argument. See: http://krijnhoetmer.nl/irc-logs/whatwg/20090324#l-236
The spec already seems to say this... Am I missing something?
Sorry. I was looking at the interface name and missed the sentence: "This does not apply to XML documents or to elements that are not in the HTML namespace despite being in HTML documents." Indeed, the spec says this for setAttribute. However, it doesn't say it for getAttribute and getAttributeNode.
Why would getAttribute() or getAttributeNode() do anything special?
For performance and consistency with past behavior, the actual matching should be exact matching after the argument has been lower cased. http://software.hixie.ch/utilities/js/live-dom-viewer/saved/51
I agree entirely, but that would argue for mutation when setting, not getting.
Assume the internal representation is interned "foobar" and assume you call getAttribute("FooBar"). Now you have to lowercase the argument in order to do pointer compares with interned strings. That is, I'm arguing that the spec doesn't match Gecko/WebKit reality when it says the comparison operation should be case-insensitive.
The spec in fact doesn't say anything about getAttribute() at all.
Added a section on getAttribute() and getAttributeNS() that says that the argument is lowercased first.
This bug predates the HTML Working Group Decision Policy. If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.