Closed
Bug 361241
Opened 18 years ago
Closed 18 years ago
setAttributeNode doesn't fire exception when Attr from different document is used
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: joao.eiras, Unassigned)
Details
Attachments
(1 file)
807 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061119 Minefield/3.0a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061119 Minefield/3.0a1
The DOM Core defined the method setAttributeNode for the Element interface.
From http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-887236154
Exceptions
DOMException
WRONG_DOCUMENT_ERR: Raised if newAttr was created from
a different document than the one that created the element.
Yet, this doesn't happen. An attribute node from another document, can easily be imported to a different document, without any exception being fired.
This causes interoperabily issues with other UAs and with the original specification.
Reproducible: Always
Steps to Reproduce:
1. Refer to the attached testcase
Actual Results:
The testcase must report a Pass status
Expected Results:
The testcase fails because an exception isn't fired.
An attached testcase will follow up
Reporter | ||
Comment 1•18 years ago
|
||
Reporter | ||
Comment 3•18 years ago
|
||
Yes, related, but I searched for setAttributeNode, and I got no relevant results.
This tests for another method.
![]() |
||
Comment 4•18 years ago
|
||
> Probable dupe of bug 47903?
Nope.
You could fix this bug today if you want -- just throw in an ownerDocument check. If you do it right, I promise speedy review. ;)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Comment 5•18 years ago
|
||
(In reply to comment #4)
> > Probable dupe of bug 47903?
>
> Nope.
Huh, what am I missing? SetAttributeNode goes through SetNameItemInternal which bug 47903 fixes.
![]() |
||
Comment 6•18 years ago
|
||
Ah, I missed that. Never mind me. :(
Updated•14 years ago
|
Assignee: general → nobody
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•