Added .addAsFirstChild() method to dom.Element which takes an element and inserts it before the element's first child node.