3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
8 * @class Ext.CompositeElementLite
10 Ext.apply(Ext.CompositeElementLite.prototype, {
11 addElements : function(els, root){
15 if(typeof els == "string"){
16 els = Ext.Element.selectorFunction(els, root);
18 var yels = this.elements;
19 Ext.each(els, function(e) {
20 yels.push(Ext.get(e));
26 * Returns the first Element
27 * @return {Ext.Element}
34 * Returns the last Element
35 * @return {Ext.Element}
38 return this.item(this.getCount()-1);
42 * Returns true if this composite contains the passed element
43 * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
46 contains : function(el){
47 return this.indexOf(el) != -1;
51 * Removes the specified element(s).
52 * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
53 * or an array of any of those.
54 * @param {Boolean} removeDom (optional) True to also remove the element from the document
55 * @return {CompositeElement} this
57 removeElement : function(keys, removeDom){
61 Ext.each(keys, function(val){
62 if ((el = (els[val] || els[val = me.indexOf(val)]))) {