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.
- Documentation
- › API
- › DOM API
- › insertBefore
XopusNode.insertBefore( newChild : XopusNode, refChild : XopusNode) : XopusNode
: XopusNode, refChild : XopusNode) : XopusNode