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)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 47903

People

(Reporter: joao.eiras, Unassigned)

Details

Attachments

(1 file)

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
Attached file Testcase
Probable dupe of bug 47903?
Yes, related, but I searched for setAttributeNode, and I got no relevant results. This tests for another method.
Depends on: 47903
> 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
(In reply to comment #4) > > Probable dupe of bug 47903? > > Nope. Huh, what am I missing? SetAttributeNode goes through SetNameItemInternal which bug 47903 fixes.
Ah, I missed that. Never mind me. :(
*** This bug has been marked as a duplicate of 47903 ***
Status: NEW → RESOLVED
Closed: 18 years ago
No longer depends on: 47903
Resolution: --- → DUPLICATE
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
Assignee: general → nobody
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: