src/http/get-index/ssr.js
/**
 * Prepend a child to an element.
 *
 * @param elem The element to prepend before.
 * @param child The element to be added as a child.
 */
Prepend a child to an element.
@param elem The element to prepend before.
@param child The element to be added as a child.
Prepend a child to an element . @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) {
    var 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 ) { var 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 .