Closed
Bug 371552
Opened 17 years ago
Closed 8 years ago
setAttributeNode behavior when node was created with createAttributeNS
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: sayrer, Unassigned)
Details
(Keywords: testcase)
Attachments
(3 files)
No description provided.
Reporter | ||
Comment 1•17 years ago
|
||
Reporter | ||
Comment 2•17 years ago
|
||
works in Opera 9
Reporter | ||
Comment 3•17 years ago
|
||
works in WebKit trunk, but not in released Safari
Reporter | ||
Comment 4•17 years ago
|
||
This was discovered while adding dom-level2-core to the mochitest run. I tested Fx 1.0.8, Fx 1.5, and Fx 2.0.0.2, and none of them passed, so it's not a regression.
Status: NEW → ASSIGNED
Comment 5•17 years ago
|
||
I believe this is INVALID. You're mixing DOM Level 1 (non-namespace-aware methods) with DOM Level 2 (namespace-aware methods). attribute = doc.createAttributeNS("http://www.w3.org/DOM","domestic"); newAttribute = element.setAttributeNode(attribute); That should probably be setAttributeNodeNS. http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-ElSetAtNodeNS
Comment 6•17 years ago
|
||
Reporter | ||
Comment 7•17 years ago
|
||
(In reply to comment #5) > I believe this is INVALID. You're mixing DOM Level 1 (non-namespace-aware > methods) with DOM Level 2 (namespace-aware methods). Nice catch. But it wasn't me! :) It was the W3C test suite. I'll note that the spec says "don't do that", but it doesn't specify what should happen if you do. Is this a bug in Opera, WebKit, and the W3C test suite? Let's CC Anne and see what he thinks.
Reporter | ||
Updated•17 years ago
|
Summary: hasAttributeNS incorrect for newly created nodes → setAttributeNode behavior when node was created with createAttributeNS
Reporter | ||
Comment 8•17 years ago
|
||
Filed WebKit bug: http://bugs.webkit.org/show_bug.cgi?id=12881
Comment 9•17 years ago
|
||
I think having setAttributeNodeNS doesn't make much sense... And if it needs to be there for compatibility it should just map to setAttributeNode.
Updated•10 years ago
|
Assignee: general → nobody
Comment 10•8 years ago
|
||
After: https://github.com/whatwg/dom/issues/117 https://bugzilla.mozilla.org/show_bug.cgi?id=1227458 this bug should not be closed too?
Updated•8 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•