Closed
Bug 547798
Opened 15 years ago
Closed 13 years ago
Calling appendChild() on an attribute node causes NS_ERROR_NOT_IMPLEMENTED
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: jason, Unassigned)
References
Details
Attachments
(1 file)
227 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
i have a piece of Javascript code which walks the DOM tree doing various transformations. sometimes i need to alter the value (ie the children) of an attribute node, but Firefox seems to disallow this.
Reproducible: Always
Steps to Reproduce:
1. make a text node
2. try to add it to an attribute node as a child
3. error results
Actual Results:
call failed with error --
uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///Users/jason/janx/web/janx/tree_walker.js :: anonymous :: line 287" data: no]
Expected Results:
i expected the call to succeed as it does on other DOM implementations (eg WebKit) and as the specification describes. attributes may have multiple child nodes -- eg if there is an entity reference inside the text or something -- and the child list should be read only.
Comment 1•15 years ago
|
||
Chrome passes this test, Opera 10.10 throws a HIERARCHY_REQUEST_ERR. IE doesn't throw, but doesn't actually append a child to the Attr node.
I'm not convinced that DOM3CORE actually defines what should happen here.
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•14 years ago
|
Comment 2•13 years ago
|
||
Invalid per DOM4.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Updated•13 years ago
|
Resolution: INVALID → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•