function prependChild(elem, child) {
    removeElement(child);
    child.parent = elem;
    child.prev = null;
    if (elem.children.unshift(child) !== 1) {
        const sibling = elem.children[1];
        sibling.prev = child;
        child.next = sibling;
    }
    else {
        child.next = null;
    }
}
/**
 * Prepend a child to an element.
 *
 * @category Manipulation
 * @param elem The element to prepend before.
 * @param child The element to be added as a child.
 */
Prepend a child to an element.
@category Manipulation
@param elem The element to prepend before.
@param child The element to be added as a child.
Prepend a child to an element . @category Manipulation @param elem The element to prepend before . @param child The element to be added as a child .
function prependChild(elem, child) {
    removeElement(child);
    child.parent = elem;
    child.prev = null;
    if (elem.children.unshift(child) !== 1) {
        const sibling = elem.children[1];
        sibling.prev = child;
        child.next = sibling;
    }
    else {
        child.next = null;
    }
}
function prependChild ( elem , child ) { removeElement ( child ) ; child . parent = elem ; child . prev = null ; if ( elem . children . unshift ( child ) !== 1 ) { const sibling = elem . children [ 1 ] ; sibling . prev = child ; child . next = sibling ; } else { child . next = null ; } }
Prepend a child to an element.
Prepend a child to an element .