code: public static void insertBefore(Element newElement, Element before) {
          before.parentNode.insertBefore(newElement, before);
      }
docs: Inserts the specified element into the parent of the before element.