function domReplaceChild(newChild, oldChild) {
  return oldChild.parentNode.replaceChild(newChild, oldChild);
}
Replaces an old child node with a new child node.

@param {Node} newChild  New child to append.
@param {Node} oldChild  Old child to remove.
@return {Node}  Replaced node.