Ext.data.JsonP.Ext_dom_CompositeElement({"mixins":[],"code_type":"ext_define","inheritable":false,"component":false,"meta":{},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":["Ext.Base","Ext.dom.CompositeElementLite"],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"$className","id":"property-S-className"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"configMap","id":"property-configMap"},{"meta":{"readonly":true},"owner":"Ext.dom.CompositeElementLite","tagname":"property","name":"elements","id":"property-elements"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigList","id":"property-initConfigList"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"initConfigMap","id":"property-initConfigMap"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"property","name":"isComposite","id":"property-isComposite"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"property","name":"isInstance","id":"property-isInstance"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"property","name":"self","id":"property-self"}],"css_var":[],"method":[{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"add","id":"method-add"},{"meta":{"deprecated":{"text":"as of 4.1. Use {@link #callParent} instead."},"protected":true},"owner":"Ext.Base","tagname":"method","name":"callOverridden","id":"method-callOverridden"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"callParent","id":"method-callParent"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"clear","id":"method-clear"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"configClass","id":"method-configClass"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"contains","id":"method-contains"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"destroy","id":"method-destroy"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"each","id":"method-each"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"fill","id":"method-fill"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"filter","id":"method-filter"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"first","id":"method-first"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"getConfig","id":"method-getConfig"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"getCount","id":"method-getCount"},{"meta":{},"owner":"Ext.Base","tagname":"method","name":"getInitialConfig","id":"method-getInitialConfig"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"hasConfig","id":"method-hasConfig"},{"meta":{"private":true},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"importElementMethods","id":"method-importElementMethods"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"indexOf","id":"method-indexOf"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"initConfig","id":"method-initConfig"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"item","id":"method-item"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"last","id":"method-last"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"onConfigUpdate","id":"method-onConfigUpdate"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"removeElement","id":"method-removeElement"},{"meta":{},"owner":"Ext.dom.CompositeElementLite","tagname":"method","name":"replaceElement","id":"method-replaceElement"},{"meta":{"private":true},"owner":"Ext.Base","tagname":"method","name":"setConfig","id":"method-setConfig"},{"meta":{"protected":true},"owner":"Ext.Base","tagname":"method","name":"statics","id":"method-statics"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":"Ext.dom.CompositeElementLite","html":"

Alternate names

Ext.CompositeElement

Hierarchy

Ext.Base
Ext.dom.CompositeElementLite
Ext.dom.CompositeElement

Files

This class encapsulates a collection of DOM elements, providing methods to filter\nmembers, or to perform collective actions upon the whole set.

\n\n\n

Although they are not listed, this class supports all of the methods of Ext.dom.Element and\nExt.fx.Anim. The methods from these classes will be performed on all the elements in this collection.

\n\n\n

All methods return this and can be chained.

\n\n\n

Usage:

\n\n
 var els = Ext.select(\"#some-el div.some-class\", true);\n // or select directly from an existing element\n var el = Ext.get('some-el');\n el.select('div.some-class', true);\n\n els.setWidth(100); // all elements become 100 width\n els.hide(true); // all elements fade out and hide\n // or\n els.setWidth(100).hide(true);\n 
\n\n

Properties

Defined By

Instance Properties

...
\n

Defaults to: "Ext.Base"

...
\n

Defaults to: {}

The Array of DOM elements which this CompositeElement encapsulates. ...

The Array of DOM elements which this CompositeElement encapsulates.

\n\n

This will not usually be accessed in developers' code, but developers wishing to augment the capabilities\nof the CompositeElementLite class may use it when adding methods to the class.

\n\n

For example to add the nextAll method to the class to add all following siblings of selected elements,\nthe code would be

\n\n
Ext.override(Ext.dom.CompositeElementLite, {\n    nextAll: function() {\n        var elements = this.elements, i, l = elements.length, n, r = [], ri = -1;\n\n        // Loop through all elements in this Composite, accumulating\n        // an Array of all siblings.\n        for (i = 0; i < l; i++) {\n            for (n = elements[i].nextSibling; n; n = n.nextSibling) {\n                r[++ri] = n;\n            }\n        }\n\n        // Add all found siblings to this Composite\n        return this.add(r);\n    }\n});\n
\n

Defaults to: []

...
\n

Defaults to: []

...
\n

Defaults to: {}

true in this class to identify an object as an instantiated CompositeElement, or subclass thereof. ...

true in this class to identify an object as an instantiated CompositeElement, or subclass thereof.

\n

Defaults to: true

...
\n

Defaults to: true

Get the reference to the current class from which this object was instantiated. ...

Get the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison

\n\n
Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); // dependent on 'this'\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n
\n
Defined By

Static Properties

...
\n

Defaults to: []

Methods

Defined By

Instance Methods

Adds elements to this Composite object. ...

Adds elements to this Composite object.

\n

Parameters

  • els : HTMLElement[]/Ext.dom.CompositeElement

    Either an Array of DOM elements to add, or another Composite\nobject who's elements should be added.

    \n

Returns

( Array/Arguments args ) : Objectdeprecatedprotected
Call the original method that was previously overridden with override\n\nExt.define('My.Cat', {\n constructor: functi...

Call the original method that was previously overridden with override

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n
\n

This method has been deprecated

\n

as of 4.1. Use callParent instead.

\n\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callOverridden(arguments)

    \n

Returns

  • Object

    Returns the result of calling the overridden method

    \n
( Array/Arguments args ) : Objectprotected
Call the \"parent\" method of the current method. ...

Call the \"parent\" method of the current method. That is the method previously\noverridden by derivation or by an override (see Ext.define).

\n\n
 Ext.define('My.Base', {\n     constructor: function (x) {\n         this.x = x;\n     },\n\n     statics: {\n         method: function (x) {\n             return x;\n         }\n     }\n });\n\n Ext.define('My.Derived', {\n     extend: 'My.Base',\n\n     constructor: function () {\n         this.callParent([21]);\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // alerts 21\n
\n\n

This can be used with an override as follows:

\n\n
 Ext.define('My.DerivedOverride', {\n     override: 'My.Derived',\n\n     constructor: function (x) {\n         this.callParent([x*2]); // calls original My.Derived constructor\n     }\n });\n\n var obj = new My.Derived();\n\n alert(obj.x);  // now alerts 42\n
\n\n

This also works with static methods.

\n\n
 Ext.define('My.Derived2', {\n     extend: 'My.Base',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Base.method\n         }\n     }\n });\n\n alert(My.Base.method(10);     // alerts 10\n alert(My.Derived2.method(10); // alerts 20\n
\n\n

Lastly, it also works with overridden static methods.

\n\n
 Ext.define('My.Derived2Override', {\n     override: 'My.Derived2',\n\n     statics: {\n         method: function (x) {\n             return this.callParent([x*2]); // calls My.Derived2.method\n         }\n     }\n });\n\n alert(My.Derived2.method(10); // now alerts 40\n
\n

Parameters

  • args : Array/Arguments

    The arguments, either an array or the arguments object\nfrom the current method, for example: this.callParent(arguments)

    \n

Returns

  • Object

    Returns the result of calling the parent method

    \n
Removes all elements. ...

Removes all elements.

\n
Returns true if this composite contains the passed element ...

Returns true if this composite contains the passed element

\n

Parameters

Returns

Calls the passed function for each element in this composite. ...

Calls the passed function for each element in this composite.

\n

Parameters

  • fn : Function

    The function to call.

    \n

    Parameters

  • scope : Object (optional)

    The scope (this reference) in which the function is executed.\nDefaults to the Element.

    \n

Returns

Clears this Composite and adds the elements passed. ...

Clears this Composite and adds the elements passed.

\n

Parameters

  • els : HTMLElement[]/Ext.dom.CompositeElement

    Either an array of DOM elements, or another Composite from which\nto fill this Composite.

    \n

Returns

Filters this composite to only elements that match the passed selector. ...

Filters this composite to only elements that match the passed selector.

\n

Parameters

  • selector : String/Function

    A string CSS selector or a comparison function. The comparison function will be\ncalled with the following arguments:

    \n

Returns

Returns the first Element ...

Returns the first Element

\n

Returns

...
\n

Parameters

Returns the number of elements in this Composite. ...

Returns the number of elements in this Composite.

\n

Returns

Returns the initial configuration passed to constructor when instantiating\nthis class. ...

Returns the initial configuration passed to constructor when instantiating\nthis class.

\n

Parameters

  • name : String (optional)

    Name of the config option to return.

    \n

Returns

  • Object/Mixed

    The full config object or a single config value\nwhen name parameter specified.

    \n
...
\n

Parameters

Copies all of the functions from Ext.dom.Element's prototype onto CompositeElementLite's prototype. ...

Copies all of the functions from Ext.dom.Element's prototype onto CompositeElementLite's prototype.\nThis is called twice - once immediately below, and once again after additional Ext.dom.Element\nare added in Ext JS

\n
Find the index of the passed element within the composite collection. ...

Find the index of the passed element within the composite collection.

\n

Parameters

Returns

Initialize configuration for this class. ...

Initialize configuration for this class. a typical example:

\n\n
Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\n

Parameters

Returns

Returns a flyweight Element of the dom element object at the specified index ...

Returns a flyweight Element of the dom element object at the specified index

\n

Parameters

Returns

Returns the last Element ...

Returns the last Element

\n

Returns

( Object names, Object callback, Object scope )private
...
\n

Parameters

Removes the specified element(s). ...

Removes the specified element(s).

\n

Parameters

  • el : String/HTMLElement/Ext.Element/Number

    The id of an element, the Element itself, the index of the\nelement in this composite or an array of any of those.

    \n
  • removeDom : Boolean (optional)

    True to also remove the element from the document

    \n

Returns

Replaces the specified element with the passed element. ...

Replaces the specified element with the passed element.

\n

Parameters

  • el : String/HTMLElement/Ext.Element/Number

    The id of an element, the Element itself, the index of the\nelement in this composite to replace.

    \n
  • replacement : String/Ext.Element

    The id of an element or the Element itself.

    \n
  • domReplace : Boolean (optional)

    True to remove and replace the element in the document too.

    \n

Returns

( Object config, Object applyIfNotSet )private
...
\n

Parameters

Get the reference to the class from which this object was instantiated. ...

Get the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

\n\n
Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n
\n

Returns

Defined By

Static Methods

( Object config )privatestatic
...
\n

Parameters

...
\n

Parameters

( Object name, Object member )privatestatic
...
\n

Parameters

Add methods / properties to the prototype of this class. ...

Add methods / properties to the prototype of this class.

\n\n
Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.addMembers({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\n

Parameters

Add / override static properties of this class. ...

Add / override static properties of this class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n
\n

Parameters

Returns

( Object xtype )privatestatic
...
\n

Parameters

( Ext.Base fromClass, Array/String members ) : Ext.Baseprivatestatic
Borrow another class' members to the prototype of this class. ...

Borrow another class' members to the prototype of this class.

\n\n
Ext.define('Bank', {\n    money: '$$$',\n    printMoney: function() {\n        alert('$$$$$$$');\n    }\n});\n\nExt.define('Thief', {\n    ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\n

Parameters

  • fromClass : Ext.Base

    The class to borrow members from

    \n
  • members : Array/String

    The names of the members to borrow

    \n

Returns

Create a new instance of this Class. ...

Create a new instance of this Class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n
\n\n

All parameters are passed to the constructor of the class.

\n

Returns

Create aliases for existing prototype methods. ...

Create aliases for existing prototype methods. Example:

\n\n
Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n
\n

Parameters

( Object config )privatestatic
...
\n

Parameters

Get the current class' name in string format. ...

Get the current class' name in string format.

\n\n
Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n
\n

Returns

( )deprecatedstatic
Adds members to class. ...

Adds members to class.

\n
\n

This method has been deprecated since 4.1

\n

Use addMembers instead.

\n\n
\n
( Object name, Object mixinClass )privatestatic
Used internally by the mixins pre-processor ...

Used internally by the mixins pre-processor

\n

Parameters

( Object fn, Object scope )privatestatic
...
\n

Parameters

( Object members ) : Ext.Basedeprecatedstatic
Override members of this class. ...

Override members of this class. Overridden methods can be invoked via\ncallParent.

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callParent(arguments);\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n\n

As of 4.1, direct use of this method is deprecated. Use Ext.define\ninstead:

\n\n
Ext.define('My.CatOverride', {\n    override: 'My.Cat',\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        this.callParent(arguments);\n\n        alert(\"Meeeeoooowwww\");\n    }\n});\n
\n\n

The above accomplishes the same result but can be managed by the Ext.Loader\nwhich can properly order the override and its target class and the build process\ncan determine whether the override is needed based on the required state of the\ntarget class (My.Cat).

\n
\n

This method has been deprecated since 4.1.0

\n

Use Ext.define instead

\n\n
\n

Parameters

  • members : Object

    The properties to add to this class. This should be\nspecified as an object literal containing one or more properties.

    \n

Returns

","subclasses":[],"name":"Ext.dom.CompositeElement","alternateClassNames":["Ext.CompositeElement"],"inheritdoc":null,"files":[{"href":"CompositeElement.html#Ext-dom-CompositeElement","filename":"CompositeElement.js"}],"html_meta":{},"singleton":false,"id":"class-Ext.dom.CompositeElement","statics":{"property":[{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"property","name":"$onExtended","id":"static-property-S-onExtended"}],"event":[],"css_var":[],"method":[{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addConfig","id":"static-method-addConfig"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addInheritableStatics","id":"static-method-addInheritableStatics"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addMember","id":"static-method-addMember"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"addMembers","id":"static-method-addMembers"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"addStatics","id":"static-method-addStatics"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"addXtype","id":"static-method-addXtype"},{"meta":{"private":true,"static":true},"owner":"Ext.Base","tagname":"method","name":"borrow","id":"static-method-borrow"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"create","id":"static-method-create"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"createAlias","id":"static-method-createAlias"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"extend","id":"static-method-extend"},{"meta":{"static":true},"owner":"Ext.Base","tagname":"method","name":"getName","id":"static-method-getName"},{"meta":{"deprecated":{"text":"Use {@link #addMembers} instead.","version":"4.1"},"static":true},"owner":"Ext.Base","tagname":"method","name":"implement","id":"static-method-implement"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"mixin","id":"static-method-mixin"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"onExtended","id":"static-method-onExtended"},{"meta":{"deprecated":{"text":"Use {@link Ext#define Ext.define} instead","version":"4.1.0"},"markdown":true,"static":true},"owner":"Ext.Base","tagname":"method","name":"override","id":"static-method-override"},{"meta":{"static":true,"private":true},"owner":"Ext.Base","tagname":"method","name":"triggerExtended","id":"static-method-triggerExtended"}],"css_mixin":[],"cfg":[]},"requires":[]});