public/javascripts/yui/treeview/treeview.js
function(node) { 
        var p = node.parent;

        // Update the parent's collection of children
        var a = [];

        for (var i=0, len=p.children.length;i<len;++i) {
            if (p.children[i] != node) {
                a[a.length] = p.children[i];
            }
        }

        p.children = a;

        // reset the childrenRendered flag for the parent
        p.childrenRendered = false;

         // Update the sibling relationship
        if (node.previousSibling) {
            node.previousSibling.nextSibling = node.nextSibling;
        }

        if (node.nextSibling) {
            node.nextSibling.previousSibling = node.previousSibling;
        }

		if (this.currentFocus == node) {
			this.currentFocus = null;
		}
		if (this._currentlyHighlighted == node) {
			this._currentlyHighlighted = null;
		}

        node.parent = null;
        node.previousSibling = null;
        node.nextSibling = null;
        node.tree = null;

        // Update the tree's node collection 
        delete this._nodes[node.index];
    }
function(node) { 
        var p = node.parent;

        // Update the parent's collection of children
        var a = [];

        for (var i=0, len=p.children.length;i<len;++i) {
            if (p.children[i] != node) {
                a[a.length] = p.children[i];
            }
        }

        p.children = a;

        // reset the childrenRendered flag for the parent
        p.childrenRendered = false;

         // Update the sibling relationship
        if (node.previousSibling) {
            node.previousSibling.nextSibling = node.nextSibling;
        }

        if (node.nextSibling) {
            node.nextSibling.previousSibling = node.previousSibling;
        }

		if (this.currentFocus == node) {
			this.currentFocus = null;
		}
		if (this._currentlyHighlighted == node) {
			this._currentlyHighlighted = null;
		}

        node.parent = null;
        node.previousSibling = null;
        node.nextSibling = null;
        node.tree = null;

        // Update the tree's node collection 
        delete this._nodes[node.index];
    }
function ( node ) { var p = node . parent ; // Update the parent's collection of children var a = [ ] ; for ( var i = 0 , len = p . children . length ; i < len ; ++ i ) { if ( p . children [ i ] != node ) { a [ a . length ] = p . children [ i ] ; } } p . children = a ; // reset the childrenRendered flag for the parent p . childrenRendered = false ; // Update the sibling relationship if ( node . previousSibling ) { node . previousSibling . nextSibling = node . nextSibling ; } if ( node . nextSibling ) { node . nextSibling . previousSibling = node . previousSibling ; } if ( this . currentFocus == node ) { this . currentFocus = null ; } if ( this . _currentlyHighlighted == node ) { this . _currentlyHighlighted = null ; } node . parent = null ; node . previousSibling = null ; node . nextSibling = null ; node . tree = null ; // Update the tree's node collection  delete this . _nodes [ node . index ] ; }
Removes the node from the tree, preserving the child collection
to make it possible to insert the branch into another part of the
tree, or another tree.
@method popNode
@param {Node} node to remove
Removes the node from the tree preserving the child collection to make it possible to insert the branch into another part of the tree or another tree .