HTMLInputElement.ReplaceChild
Syntax:
Parameters:
<NewNode> (required)
A new child node.
<OldNode> (required)
The existing child node.
Returned value:
Description:
If the new node is DocumentFragment, the replaced node will be replaced by all child nodes of the document fragment.
If the new node is already included in the document tree, it is first deleted from the child nodes of the previous parent and then is inserted into the child node list of the new parent.
Availability:
Note:
- if the given node does not allow the node being added as a child node or if the added node is a parent for the given.
- if the node is added to itself.
- if the given node - Document and the second node DocumentType or Element is added.
- if the node being added was created by the document different from the one that created the given node.
- if the given node is in the read-only mode or if the previous parent of the added node in the Read-only mode.
- if the replaced node is not found.
- if the added node is a child node for the Document node and implementation does not support deleting DocumentType and Element nodes from the Document node.