4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-CompositeElementLite'>/**
19 </span> * @class Ext.CompositeElementLite
21 Ext.apply(Ext.CompositeElementLite.prototype, {
22 addElements : function(els, root){
26 if(typeof els == "string"){
27 els = Ext.core.Element.selectorFunction(els, root);
29 var yels = this.elements;
30 Ext.each(els, function(e) {
31 yels.push(Ext.get(e));
36 <span id='Ext-CompositeElementLite-method-first'> /**
37 </span> * Returns the first Element
38 * @return {Ext.core.Element}
44 <span id='Ext-CompositeElementLite-method-last'> /**
45 </span> * Returns the last Element
46 * @return {Ext.core.Element}
49 return this.item(this.getCount()-1);
52 <span id='Ext-CompositeElementLite-method-contains'> /**
53 </span> * Returns true if this composite contains the passed element
54 * @param el {Mixed} The id of an element, or an Ext.core.Element, or an HtmlElement to find within the composite collection.
57 contains : function(el){
58 return this.indexOf(el) != -1;
61 <span id='Ext-CompositeElementLite-method-removeElement'> /**
62 </span> * Removes the specified element(s).
63 * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
64 * or an array of any of those.
65 * @param {Boolean} removeDom (optional) True to also remove the element from the document
66 * @return {CompositeElement} this
68 removeElement : function(keys, removeDom){
72 Ext.each(keys, function(val){
73 if ((el = (els[val] || els[val = me.indexOf(val)]))) {
81 Ext.Array.erase(els, val, 1);