Bug 16605: text node child-adding functions throw wrong exception.

Modified nsGenericDOMDataNode::ReplaceChild() to throw
HIERARCHY_REQUEST_ERR instead of NOT_FOUND_ERR, per the spec.
sr=jst@netscape.com a=asa@mozilla.org
This commit is contained in:
hidday%geocities.com 2002-02-23 10:51:50 +00:00
parent 6b265c5d37
commit b057574143

View File

@ -119,10 +119,9 @@ public:
*aReturn = nsnull;
/*
* Data nodes can't have children, i.e. aOldChild can't be a child of
* this node.
* Data nodes can't have children.
*/
return NS_ERROR_DOM_NOT_FOUND_ERR;
return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
}
nsresult RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)
{