Closed
Bug 16606
Opened 26 years ago
Closed 26 years ago
replaceChild(newnode,document) throws wrong exception
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: dbaron, Assigned: vidur)
Details
(Whiteboard: [HAVE FIX])
DESCRIPTION: Calling Node.replaceChild(newnode,document) should throw a
NOT_FOUND_ERR rather than a HIERARCHY_REQUEST_ERR because the document is not an
already existing child of Node. A HIERARCHY_REQUEST_ERR would be appropriate if
document were the first argument and were being inserted.
STEPS TO REPRODUCE:
* Load http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/exceptions
or http://www.fas.harvard.edu/~dbaron/dom/test/one-core-html/exceptions
* hit test
ACTUAL RESULTS:
* the line below the line "Trying helem.replaceChild(pelem,document) :" is
red. This line is right before the bold heading starting the tests for
removeChild(). It currently shows that a HIERARCHY_REQUEST_ERR is being
thrown.
EXPECTED RESULTS:
* the line should be green
DOES NOT WORK CORRECTLY ON:
* Linux, viewer, 1999-10-15-11-M11
| Reporter | ||
Comment 1•26 years ago
|
||
calling removeChild(document) has the exact same problem. It should throw
NOT_FOUND_ERR, I think, rather than HIERARCHY_REQUEST_ERR. removeChild() is
definitely not permitted to throw a HIERARCHY_REQUEST_ERR - it's not among the
listed codes.
The relevant test is the one right below the previous one described - the first
test under the removeChild() section.
| Assignee | ||
Comment 2•26 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
| Assignee | ||
Comment 3•26 years ago
|
||
Johnny Stenback has a fix for this waiting in his tree.
Whiteboard: [HAVE FIX]
Target Milestone: M15
Comment 4•26 years ago
|
||
The fix is checked in now, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updated•25 years ago
|
Component: DOM Level 1 → DOM HTML
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•