This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2334 - hc_noderemovechild test removes <body> instead of <p> node
Summary: hc_noderemovechild test removes <body> instead of <p> node
Status: NEW
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 1 (show other bugs)
Version: unspecified
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-09 15:21 UTC by Darin Adler
Modified: 2005-10-09 15:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Darin Adler 2005-10-09 15:21:18 UTC
The hc_noderemovechild test claims that it will remove the "first employee". But the code in the JavaScript 
version at least does this:

      rootNode = doc.documentElement;
      childList = rootNode.childNodes;
      childToRemove = childList.item(1);
      removedChild = rootNode.removeChild(childToRemove);

The documentElement is an <html> element, and its second child is a <body> element, so this test 
removes the <body> element. This is causing trouble for the Safari team with the XHTML version of the 
test, which is having trouble reporting results after a <body> element is removed.