X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/src/data/Tree.js
diff --git a/src/data/Tree.js b/src/data/Tree.js
index 601437f6..f0c54796 100644
--- a/src/data/Tree.js
+++ b/src/data/Tree.js
@@ -1,6 +1,6 @@
/*!
- * Ext JS Library 3.1.0
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
@@ -543,6 +543,20 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, {
this.parentNode.removeChild(this, destroy);
return this;
},
+
+ /**
+ * Removes all child nodes from this node.
+ * @param {Boolean} destroy true to destroy the node upon removal. Defaults to false.
+ * @return {Node} this
+ */
+ removeAll : function(destroy){
+ var cn = this.childNodes,
+ n;
+ while((n = cn[0])){
+ this.removeChild(n, destroy);
+ }
+ return this;
+ },
/**
* Returns the child node at the specified index.