Owning interface and usage:
Member of these other interfaces :
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
||The node to insert.
||The reference node, i.e., the node before which the new node must be inserted.
The node being inserted.
- DOMException HIERARCHY_REQUEST_ERR
- Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors.
- DOMException WRONG_DOCUMENT_ERR
- Raised if newChild was created from a different document than the one that created this node.
- DOMException NO_MODIFICATION_ALLOWED_ERR
- Raised if this node is readonly.
- DOMException NOT_FOUND_ERR
- Raised if refChild is not a child of this node.
If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.