/** * @class Ext.dom.CompositeElementLite * This class encapsulates a *collection* of DOM elements, providing methods to filter members, or to perform collective * actions upon the whole set. * * Although they are not listed, this class supports all of the methods of {@link Ext.dom.Element}. The * methods from these classes will be performed on all the elements in this collection. * * Example: * * var els = Ext.select("#some-el div.some-class"); * // or select directly from an existing element * var el = Ext.get('some-el'); * el.select('div.some-class'); * * els.setWidth(100); // all elements become 100 width * els.hide(true); // all elements fade out and hide * // or * els.setWidth(100).hide(true); * * @mixins Ext.dom.Element */ /** * @property {Boolean} [isComposite=true] * `true` in this class to identify an object as an instantiated CompositeElement, or subclass thereof. */ /** * @cfg bubbleEvents */ /** * @cfg listeners * @hide */ /** * @property dom * @hide */ /** * @property id * @hide */ /** * @property {HTMLElement[]} elements * @readonly * The Array of DOM elements which this CompositeElement encapsulates. * * This will not *usually* be accessed in developers' code, but developers wishing to augment the capabilities * of the CompositeElementLite class may use it when adding methods to the class. * * For example to add the `nextAll` method to the class to **add** all following siblings of selected elements, * the code would be * * Ext.override(Ext.dom.CompositeElementLite, { * nextAll: function() { * var elements = this.elements, i, l = elements.length, n, r = [], ri = -1; * * // Loop through all elements in this Composite, accumulating * // an Array of all siblings. * for (i = 0; i < l; i++) { * for (n = elements[i].nextSibling; n; n = n.nextSibling) { * r[++ri] = n; * } * } * * // Add all found siblings to this Composite * return this.add(r); * } * }); */