end clone as the last child of frag."
    frag.appendChild(clone);

    // "Abort this method, returning frag."
    return frag;
  }

  // "Let common ancestor equal original start node."
  var commonAncestor = originalStartNode;

  // "While common ancestor is not an ancestor container of original end
  // node, set common ancestor to its own parent."
  while (!isAncestorContainer(commonAncestor, originalEndNode)) {
    commonAncestor = commonAncestor.parentNode;
  }

  // "If original start node is an anc