Open
Bug 554016
Opened 14 years ago
Updated 2 years ago
setAttributeNS("unknown", "align") after setAttributeNS(null, "align") changes return value of getAttribute("align")
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: Gavin, Unassigned)
References
()
Details
(Keywords: testcase)
I don't know what the justification is for this test's expected results ("DOM L2 Core" is all that's listed), but apparently we're the only browser that fails it: http://samples.msdn.microsoft.com/ietestcenter/#domcore
Comment 1•14 years ago
|
||
This only happens for "mapped attributes". DOM 2 Core doesn't actually define the correct behavior here.
Summary: setAttributeNS("unknown", "foo") after setAttributeNS(null, "foo") changes return value of getAttribute("foo") → setAttributeNS("unknown", "align") after setAttributeNS(null, "align") changes return value of getAttribute("align")
Comment 2•14 years ago
|
||
The second attribute of setAttributeNS (or createElementNS, for that matter) is a qualified name - prefix plus local name. DOM 3 Core backs us up on this. http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-ElSetAttrNS
Comment 3•14 years ago
|
||
Oh, I see... it's because they're using getAttribute() (DOM Level 1) with setAttributeNS() (DOM Level 2). The getAttribute() method isn't particularly well suited to work with setAttributeNS, because the latter uses namespaces, and the former doesn't. "Calling Element.getAttribute(name) with that nodeName could then return any of those attributes. The result depends on the implementation." http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Namespaces-Considerations
Comment 4•14 years ago
|
||
Yeah, this test is bogus, imo. At least pending some sort of errata to the DOM specs defining the behavior.
So, if the conclusion is that the test is invalid, we should ask Microsoft to remove it, right?
Comment 6•14 years ago
|
||
I sent an email to my MS contact.
Comment 7•14 years ago
|
||
What this test is _actually_ testing is that a certain ordering is imposed on attributes with the same localname but different namespace URIs (at least in terms of the lookup order for getAttribute). The DOM does not guarantee such an ordering. So yes, we should ask Microsoft to remove the test.
Comment 8•14 years ago
|
||
I did send this information to Travis, and he promised to forward it to whoever maintains that page.
It's still there... but of course that is expected. Every second of showing a faulty score to our disadvantage makes IE9 seem better.
Comment 10•14 years ago
|
||
That is unfortunate indeed, but what can we do if MS decides to put invalid testcase to their web page, and not react too fast to comments to fix the pages.
Comment 11•13 years ago
|
||
The current DOM specification does impose some kind of ordering for what it's worth. setAttribute/setAttributeNS calls append attributes to an ordered list.
Comment 12•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•