2 * @class Ext.CompositeElementLite
4 Ext.apply(Ext.CompositeElementLite.prototype, {
5 addElements : function(els, root){
9 if(typeof els == "string"){
10 els = Ext.core.Element.selectorFunction(els, root);
12 var yels = this.elements;
13 Ext.each(els, function(e) {
14 yels.push(Ext.get(e));
20 * Returns the first Element
21 * @return {Ext.core.Element}
28 * Returns the last Element
29 * @return {Ext.core.Element}
32 return this.item(this.getCount()-1);
36 * Returns true if this composite contains the passed element
37 * @param el {Mixed} The id of an element, or an Ext.core.Element, or an HtmlElement to find within the composite collection.
40 contains : function(el){
41 return this.indexOf(el) != -1;
45 * Removes the specified element(s).
46 * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
47 * or an array of any of those.
48 * @param {Boolean} removeDom (optional) True to also remove the element from the document
49 * @return {CompositeElement} this
51 removeElement : function(keys, removeDom){
55 Ext.each(keys, function(val){
56 if ((el = (els[val] || els[val = me.indexOf(val)]))) {