insertBefore of html, Methods Webix Docs

inserts a new node into the specified position

void insertBefore(HTMLElement node,HTMLElement before, [HTMLElement rescue] );

node

HTMLElementa new DOM node before
HTMLElementthe sibling node that the new node will be inserted before rescue

The method inserts a new node before the specified sibling (the before parameter) or as the last child of the specified parent (the rescue parameter) if the sibling doesn't exist.
The third parameter is optional and used just to avoid errors in case the specified subling doesn't exist.