code: function removeNode(node) {
      // important that we want to do this only if the node has a logical parent
      var logicalParent = tree.Logical.hasParentNode(node) &&
        tree.Logical.getParentNode(node);
      var distributed;
      var ownerRoot = this.ownerShadyRootForNode(node);
      if (logicalParent) {
        // distribute node's parent iff needed
        distributed = this.maybeDistributeParent(node);
        tree.Logical.recordRemoveChild(node, logicalParent);
        // remove node from root and distribute it iff needed
        if (ownerRoot && (this._removeDistributedChildren(ownerRoot, node) ||
          logicalParent.localName === ownerRoot.getInsertionPointTag())) {
          ownerRoot._skipUpdateInsertionPoints = false;
          ownerRoot.update();
        }
      }
      this._removeOwnerShadyRoot(node);
      return distributed;
    }
docs: Try to remove node: update logical info and perform distribution iff needed. Return true if the removal has been handled. note that it's possible for both the node's host and its parent to require distribution... both cases are handled here.