class type t =Inheritsobject
..end
method elements : Dom_html.element Js.t Js.js_array Js.t Js.readonly_prop
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);
}
});
method isComposite : bool Js.t Js.prop
true
in this class to identify an object as an instantiated CompositeElement, or subclass thereof.
Defaults to: true
method add : 'a.
'a Js.t ->
(< add : 'a. 'b; callParent : 'd 'e. 'd Js.t -> 'e Js.t Js.meth;
callSuper : 'f 'g. 'f Js.t -> 'g Js.t Js.meth;
clear : bool Js.t Js.optdef -> unit Js.meth;
contains : 'h. 'h Js.t -> bool Js.t Js.meth;
each : 'i 'j. 'i Js.callback -> 'j Js.t Js.optdef -> 'c Js.t Js.meth;
elements : Dom_html.element Js.t Js.js_array Js.t Js.readonly_prop;
fill : 'k. 'k Js.t -> 'c Js.t Js.meth;
filter : 'l. 'l Js.t -> 'c Js.t Js.meth;
first : Ext_dom_Element.t Js.t Js.meth;
getCount : Js.number Js.t Js.meth;
getInitialConfig : 'm. Js.js_string Js.t Js.optdef -> 'm Js.t Js.meth;
indexOf : 'n. 'n Js.t -> Js.number Js.t Js.meth;
initConfig : 'o. 'o Js.t -> 'c Js.t Js.meth;
isComposite : bool Js.t Js.prop;
item : Js.number Js.t -> Ext_dom_Element.t Js.t Js.meth;
last : Ext_dom_Element.t Js.t Js.meth;
removeElement : 'p. 'p Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth;
replaceElement : 'q 'r.
'q Js.t ->
'r Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth;
self : Ext_Class.t Js.t Js.prop;
slice : Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef ->
Dom_html.element Js.t Js.js_array Js.t Js.meth;
statics : Ext_Class.t Js.t Js.meth; .. >
as 'c)
Js.t Js.meth as 'b
Adds elements to this Composite object.
Parameters:
_ Js.t
Either an Array of DOM elements to add, or another Composite object who's elements should be added.
Returns:
Ext_dom_CompositeElement.t Js.t
This Composite object.
method clear : bool Js.t Js.optdef -> unit Js.meth
Removes all elements from this Composite.
Parameters:
bool Js.t
(optional)
True to also remove the elements from the document.
method contains : 'h. 'h Js.t -> bool Js.t Js.meth
Returns true if this composite contains the passed element.
Parameters:
_ Js.t
The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
method each : 'i 'j. 'i Js.callback -> 'j Js.t Js.optdef -> 'c Js.t Js.meth
Calls the passed function for each element in this composite.
Parameters:
_ Js.callback
The function to call.
_ Js.t
(optional)
The scope (this reference) in which the function is executed. Defaults to the Element.
Returns:
Ext_dom_CompositeElement.t Js.t
this
method fill : 'k. 'k Js.t -> 'c Js.t Js.meth
Clears this Composite and adds the elements passed.
Parameters:
_ Js.t
Either an array of DOM elements, or another Composite from which to fill this Composite.
Returns:
Ext_dom_CompositeElement.t Js.t
this
method filter : 'l. 'l Js.t -> 'c Js.t Js.meth
Filters this composite to only elements that match the passed selector.
Parameters:
_ Js.t
A string CSS selector or a comparison function. The comparison function will be called with the following arguments:
Returns:
Ext_dom_CompositeElement.t Js.t
this
method first : Ext_dom_Element.t Js.t Js.meth
Returns the first Element
method getCount : Js.number Js.t Js.meth
Returns the number of elements in this Composite.
method indexOf : 'n. 'n Js.t -> Js.number Js.t Js.meth
Find the index of the passed element within the composite collection.
Parameters:
_ Js.t
The id of an element, or an Ext.dom.Element, or an HtmlElement to find within the composite collection.
Returns:
Js.number Js.t
The index of the passed Ext.dom.Element in the composite collection, or -1 if not found.
method item : Js.number Js.t -> Ext_dom_Element.t Js.t Js.meth
Returns a flyweight Element of the dom element object at the specified index
Parameters:
Js.number Js.t
method last : Ext_dom_Element.t Js.t Js.meth
Returns the last Element
method removeElement : 'p. 'p Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth
Removes the specified element(s).
Parameters:
_ Js.t
The id of an element, the Element itself, the index of the element in this composite or an array of any of those.
bool Js.t
(optional)
True to also remove the element from the document.
Returns:
Ext_dom_CompositeElement.t Js.t
this
method replaceElement : 'q 'r. 'q Js.t -> 'r Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth
Replaces the specified element with the passed element.
Parameters:
_ Js.t
The id of an element, the Element itself, the index of the element in this composite to replace.
_ Js.t
The id of an element or the Element itself.
bool Js.t
(optional)
True to remove and replace the element in the document too.
Returns:
Ext_dom_CompositeElement.t Js.t
this
method slice : Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> Dom_html.element Js.t Js.js_array Js.t Js.meth
Gets a range nodes.
Parameters:
Js.number Js.t
(optional)
The index of the first node in the range
Js.number Js.t
(optional)
The index of the last node in the range
Returns:
Dom_html.element Js.t Js.js_array Js.t
An array of nodes