public/javascripts/yui/treeview/treeview-debug.js
function(node) { 

        if (node.expanded) {
            // wait until the animation is complete before deleting to
            // avoid javascript errors
            if (this._collapseAnim) {
                this.subscribe("animComplete", 
                        this._removeChildren_animComplete, this, true);
                Widget.Node.prototype.collapse.call(node);
                return;
            }

            node.collapse();
        }

        this.logger.log("Removing children for " + node);
        while (node.children.length) {
            this._deleteNode(node.children[0]);
        }

        if (node.isRoot()) {
            Widget.Node.prototype.expand.call(node);
        }

        node.childrenRendered = false;
        node.dynamicLoadComplete = false;

        node.updateIcon();
    }
function(node) { 

        if (node.expanded) {
            // wait until the animation is complete before deleting to
            // avoid javascript errors
            if (this._collapseAnim) {
                this.subscribe("animComplete", 
                        this._removeChildren_animComplete, this, true);
                Widget.Node.prototype.collapse.call(node);
                return;
            }

            node.collapse();
        }

        this.logger.log("Removing children for " + node);
        while (node.children.length) {
            this._deleteNode(node.children[0]);
        }

        if (node.isRoot()) {
            Widget.Node.prototype.expand.call(node);
        }

        node.childrenRendered = false;
        node.dynamicLoadComplete = false;

        node.updateIcon();
    }
function ( node ) { if ( node . expanded ) { // wait until the animation is complete before deleting to // avoid javascript errors if ( this . _collapseAnim ) { this . subscribe ( "animComplete" , this . _removeChildren_animComplete , this , true ) ; Widget . Node . prototype . collapse . call ( node ) ; return ; } node . collapse ( ) ; } this . logger . log ( "Removing children for " + node ) ; while ( node . children . length ) { this . _deleteNode ( node . children [ 0 ] ) ; } if ( node . isRoot ( ) ) { Widget . Node . prototype . expand . call ( node ) ; } node . childrenRendered = false ; node . dynamicLoadComplete = false ; node . updateIcon ( ) ; }
Deletes this nodes child collection, recursively.  Also collapses
the node, and resets the dynamic load flag.  The primary use for
this method is to purge a node and allow it to fetch its data
dynamically again.
@method removeChildren
@param {Node} node the node to purge
Deletes this nodes child collection recursively . Also collapses the node and resets the dynamic load flag . The primary use for this method is to purge a node and allow it to fetch its data dynamically again .