DOMNode->insertBefore Adds new child at the end of the children Description objectDOMNode->insertBefore objectnewnode objectrefnode This function inserts the new node newnode right before the node refnode. The return value is the inserted node. If you plan to do further modifications on the appended child you must use the returned node. If refnode is not supplied then newnode is appended to the children. Throws DOMException if node cannot be inserted.