W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2003

Inconsistency between Node.insertBefore, Node.addChild and Node.replaceChild regarding multiple doctype or document elements

From: Curt Arnold <carnold@houston.rr.com>
Date: Sun, 28 Dec 2003 23:58:23 -0600
Message-ID: <3FEFC27F.8020702@houston.rr.com>
To: www-dom@w3.org

Node.insertBefore is required to throw a HIERARCHY_REQUEST_ERR if the 
operation would result in a document node containing multiple document 
type or element nodes.  However, Node.addChild and Node.replaceChild can 
both result in the same condition, but do not have declare that a 
HIERARCHY_REQUEST_ERR should be thrown.  There is also a typo in the 
text for Node.insertBefore (if this node if (sic) of type).

Test nodereplacechild12 is failed by one implementation which throws an 
exception when a second element is added to a document using 
Node.appendChild.  Passing nodereplacechild12 indicates that an 
implementation does not throw an exception.
Received on Monday, 29 December 2003 00:58:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:11 UTC