add List.clearItems method. fixes #40.

This commit is contained in:
Christopher Jeffrey 2014-04-26 00:55:33 -05:00
parent 9a9611636a
commit fe08f9e819

View File

@ -4224,6 +4224,10 @@ List.prototype.removeItem = function(child) {
}
};
List.prototype.clearItems = function() {
return this.setItems([]);
};
List.prototype.setItems = function(items) {
var items = items.slice()
, original = this.items.slice()