insertBefore

Add a new child to this node, before the referenced node.

If you want to insert a new child after the referenced node, use .insertBefore(newChild, refChild.getNextSibling()). If there is no next sibling, the getNextSibling function will return null, and the insertBefore function will append.


XopusNode.insertBefore( newChild : XopusNode,  refChild : XopusNode) : XopusNode

Arguments

newChild
XopusNode. The node to insert.
refChild
XopusNode. The new nextSibling of newChild or null to append.

Return Value

XopusNode