Class type Ext.t


class type t = object .. end

method _BLANK_IMAGE_URL : Js.js_string Js.t Js.prop

URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. In older versions of IE, this defaults to "http://sencha.com/s.gif" and you should change this to a URL on your server. For other browsers it uses an inline data URL.


method _SSL_SECURE_URL : Js.js_string Js.t Js.prop

URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent the IE insecure content warning ('about:blank', except for IE in secure mode, which is 'javascript:""').


method _USE_NATIVE_JSON : bool Js.t Js.prop

Indicates whether to use native browser parsing for JSON methods. This option is ignored if the browser does not support native JSON methods.

Note: Native JSON methods will not work with objects that have functions. Also, property names must be quoted, otherwise the data will not parse.

Defaults to: false

method chromeVersion : Js.number Js.t Js.prop

The current version of Chrome (0 if the browser is not Chrome).


method emptyFn : 'a. 'a Js.callback Js.prop

A reusable empty function


method emptyString : 'b. 'b Js.t Js.prop

A zero length string which will pass a truth test. Useful for passing to methods which use a truth test to reject falsy values where a string value must be cleared.


method enableFx : bool Js.t Js.prop

True if the Ext.fx.Anim Class is available.


method enableGarbageCollector : bool Js.t Js.prop

True to automatically uncache orphaned Ext.Elements periodically

Defaults to: true

method enableListenerCollection : bool Js.t Js.prop

True to automatically purge event listeners during garbageCollection.

Defaults to: true

method enableNestedListenerRemoval : bool Js.t Js.prop

Experimental. True to cascade listener removal to child elements when an element is removed. Currently not optimized for performance.

Defaults to: false

method enumerables : Js.js_string Js.t Js.js_array Js.t Js.prop

An array containing extra enumerables for old browsers


method firefoxVersion : Js.number Js.t Js.prop

The current version of Firefox (0 if the browser is not Firefox).


method globalEvents : Ext_util_Observable.t Js.t Js.prop

An instance of Ext.util.Observable through which Ext fires global events.

This Observable instance fires the following events:


method ieVersion : Js.number Js.t Js.prop

The current version of IE (0 if the browser is not IE). This does not account for the documentMode of the current page, which is factored into isIE7, isIE8 and isIE9. Thus this is not always true:

Ext.isIE8 == (Ext.ieVersion == 8)

method isChrome : bool Js.t Js.prop

True if the detected browser is Chrome.


method isFF10 : bool Js.t Js.prop

True if the detected browser uses FireFox 10


method isFF3_0 : bool Js.t Js.prop

True if the detected browser uses FireFox 3.0


method isFF3_5 : bool Js.t Js.prop

True if the detected browser uses FireFox 3.5


method isFF3_6 : bool Js.t Js.prop

True if the detected browser uses FireFox 3.6


method isFF4 : bool Js.t Js.prop

True if the detected browser uses FireFox 4


method isFF5 : bool Js.t Js.prop

True if the detected browser uses FireFox 5


method isGecko : bool Js.t Js.prop

True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).


method isGecko10 : bool Js.t Js.prop

True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).


method isGecko3 : bool Js.t Js.prop

True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).


method isGecko4 : bool Js.t Js.prop

True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).


method isGecko5 : bool Js.t Js.prop

True if the detected browser uses a Gecko 5.0+ layout engine (e.g. Firefox 5.x).


method isIE : bool Js.t Js.prop

True if the detected browser is Internet Explorer.


method isIE10 : bool Js.t Js.prop

True if the detected browser is Internet Explorer 10.x.


method isIE10m : bool Js.t Js.prop

True if the detected browser is Internet Explorer 10.x or lower.


method isIE10p : bool Js.t Js.prop

True if the detected browser is Internet Explorer 10.x or higher.


method isIE6 : bool Js.t Js.prop

True if the detected browser is Internet Explorer 6.x.


method isIE7 : bool Js.t Js.prop

True if the detected browser is Internet Explorer 7.x.


method isIE7m : bool Js.t Js.prop

True if the detected browser is Internet Explorer 7.x or lower.


method isIE7p : bool Js.t Js.prop

True if the detected browser is Internet Explorer 7.x or higher.


method isIE8 : bool Js.t Js.prop

True if the detected browser is Internet Explorer 8.x.


method isIE8m : bool Js.t Js.prop

True if the detected browser is Internet Explorer 8.x or lower.


method isIE8p : bool Js.t Js.prop

True if the detected browser is Internet Explorer 8.x or higher.


method isIE9 : bool Js.t Js.prop

True if the detected browser is Internet Explorer 9.x.


method isIE9m : bool Js.t Js.prop

True if the detected browser is Internet Explorer 9.x or lower.


method isIE9p : bool Js.t Js.prop

True if the detected browser is Internet Explorer 9.x or higher.


method isLinux : bool Js.t Js.prop

True if the detected platform is Linux.


method isMac : bool Js.t Js.prop

True if the detected platform is Mac OS.


method isOpera : bool Js.t Js.prop

True if the detected browser is Opera.


method isOpera10_5 : bool Js.t Js.prop

True if the detected browser is Opera 10.5x.


method isReady : bool Js.t Js.prop

True when the document is fully initialized and ready for action

Defaults to: false

method isSafari : bool Js.t Js.prop

True if the detected browser is Safari.


method isSafari2 : bool Js.t Js.prop

True if the detected browser is Safari 2.x.


method isSafari3 : bool Js.t Js.prop

True if the detected browser is Safari 3.x.


method isSafari4 : bool Js.t Js.prop

True if the detected browser is Safari 4.x.


method isSafari5 : bool Js.t Js.prop

True if the detected browser is Safari 5.x.


method isSafari5_0 : bool Js.t Js.prop

True if the detected browser is Safari 5.0.x.


method isSecure : bool Js.t Js.prop

True if the page is running over SSL


method isWebKit : bool Js.t Js.prop

True if the detected browser uses WebKit.


method isWindows : bool Js.t Js.prop

True if the detected platform is Windows.


method name : Js.js_string Js.t Js.prop

The name of the property in the global namespace (The window in browser environments) which refers to the current instance of Ext.

This is usually "Ext", but if a sandboxed build of ExtJS is being used, this will be an alternative name.

If code is being generated for use by eval or to create a new Function, and the global instance of Ext must be referenced, this is the name that should be built into the code.

Defaults to: 'Ext'

method operaVersion : Js.number Js.t Js.prop

The current version of Opera (0 if the browser is not Opera).


method safariVersion : Js.number Js.t Js.prop

The current version of Safari (0 if the browser is not Safari).


method useShims : bool Js.t Js.prop

By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, you may want to set this to true.


method webKitVersion : Js.number Js.t Js.prop

The current version of WebKit (0 if the browser does not use WebKit).


method addBehaviors : 'c. 'c Js.t -> unit Js.meth

Applies event listeners to elements by selectors when the document is ready. The event name is specified with an @ suffix.

Ext.addBehaviors({
    // add a listener for click on all anchors in element with id foo
    '#foo a@click' : function(e, t){
        // do something
    },

    // add the same listener to multiple selectors (separated by comma BEFORE the @)
    '#foo a, #bar span.some-class@mouseover' : function(){
        // do something
    }
});

Parameters:


method addNamespaces : 'd. 'd Js.t -> unit Js.meth

Adds namespace(s) to known list.

Parameters:


method application : 'e. 'e Js.t -> unit Js.meth

Loads Ext.app.Application class and starts it up with given configuration after the page is ready.

See Ext.app.Application for details.

Parameters:


method apply : 'f 'g 'h 'i. 'f Js.t -> 'g Js.t -> 'h Js.t Js.optdef -> 'i Js.t Js.meth

Copies all the properties of config to the specified object. Note that if recursive merging and cloning without referencing the original objects / arrays is needed, use Ext.Object.merge instead.

Parameters:

Returns:


method applyIf : 'j 'k 'l. 'j Js.t -> 'k Js.t -> 'l Js.t Js.meth

Copies all the properties of config to object if they don't already exist.

Parameters:

Returns:


method batchLayouts : 'm 'n. 'm Js.callback -> 'n Js.t Js.optdef -> unit Js.meth

Utility wrapper that suspends layouts of all components for the duration of a given function.

Parameters:


method bind : 'o 'p 'q 'r 's.
'o Js.callback ->
'p Js.t Js.optdef ->
'q Js.js_array Js.t Js.optdef ->
'r Js.t Js.optdef -> 's Js.callback Js.meth

Create a new function from the provided fn, change this to the provided scope, optionally overrides arguments for the call. (Defaults to the arguments passed by the caller)

Ext.bind is alias for Ext.Function.bind

Parameters:

Returns:


method callback : 't 'u 'v 'w.
't Js.callback ->
'u Js.t Js.optdef ->
'v Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.optdef -> 'w Js.t Js.meth

Execute a callback function in a particular scope. If callback argument is a function reference, that is called. If it is a string, the string is assumed to be the name of a method on the given scope. If no function is passed the call is ignored.

For example, these calls are equivalent:

 var myFunc = this.myFunc;

 Ext.callback('myFunc', this, [arg1, arg2]);
 Ext.callback(myFunc, this, [arg1, arg2]);

 Ext.isFunction(myFunc) && this.myFunc(arg1, arg2);

Parameters:

Returns:


method clone : 'x 'y. 'x Js.t -> 'y Js.t Js.meth

Clone simple variables including array, {}-like objects, DOM nodes and Date without keeping the old reference. A reference for the object itself is returned if it's not a direct decendant of Object. For model cloning, see Model.copy.

Parameters:

Returns:


method coerce : 'z 'a1 'b1. 'z Js.t -> 'a1 Js.t -> 'b1 Js.t Js.meth

Coerces the first value if possible so that it is comparable to the second value.

Coercion only works between the basic atomic data types String, Boolean, Number, Date, null and undefined.

Numbers and numeric strings are coerced to Dates using the value as the millisecond era value.

Strings are coerced to Dates by parsing using the defaultFormat.

For example

Ext.coerce('false', true);

returns the boolean value false because the second parameter is of type Boolean.

Parameters:

Returns:


method copyTo : 'c1 'd1 'e1 'f1.
'c1 Js.t -> 'd1 Js.t -> 'e1 Js.t -> bool Js.t Js.optdef -> 'f1 Js.t Js.meth

Copies a set of named properties fom the source object to the destination object.

Example:

ImageComponent = Ext.extend(Ext.Component, {
    initComponent: function() {
        this.autoEl = { tag: 'img' };
        MyComponent.superclass.initComponent.apply(this, arguments);
        this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
    }
});

Important note: To borrow class prototype methods, use Ext.Base.borrow instead.

Parameters:

Returns:


method create : 'g1 'h1.
Js.js_string Js.t Js.optdef -> 'g1 Js.t Js.optdef -> 'h1 Js.t Js.meth

Instantiate a class by either full name, alias or alternate name.

If Ext.Loader is enabled and the class has not been defined yet, it will attempt to load the class via synchronous loading.

For example, all these three lines return the same result:

 // alias
 var window = Ext.create('widget.window', {
     width: 600,
     height: 800,
     ...
 });

 // alternate name
 var window = Ext.create('Ext.Window', {
     width: 600,
     height: 800,
     ...
 });

 // full class name
 var window = Ext.create('Ext.window.Window', {
     width: 600,
     height: 800,
     ...
 });

 // single object with xclass property:
 var window = Ext.create({
     xclass: 'Ext.window.Window', // any valid value for 'name' (above)
     width: 600,
     height: 800,
     ...
 });

Parameters:

Returns:


method createByAlias : 'i1 'j1. Js.js_string Js.t -> 'i1 Js.t -> 'j1 Js.t Js.meth

Instantiate a class by its alias.

Ext.ClassManager.instantiateByAlias is usually invoked by the shorthand createByAlias.

If Ext.Loader is enabled and the class has not been defined yet, it will attempt to load the class via synchronous loading.

var window = Ext.createByAlias('widget.window', { width: 600, height: 800, ... });

Parameters:


method decode : 'k1. Js.js_string Js.t -> bool Js.t Js.optdef -> 'k1 Js.t Js.meth

Shorthand for Ext.JSON.decode

Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set.

Parameters:

Returns:


method defer : 'l1 'm1 'n1 'o1.
'l1 Js.callback ->
Js.number Js.t ->
'm1 Js.t Js.optdef ->
'n1 Js.js_array Js.t Js.optdef ->
'o1 Js.t Js.optdef -> Js.number Js.t Js.meth

Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage:

var sayHi = function(name){
    alert('Hi, ' + name);
}

// executes immediately:
sayHi('Fred');

// executes after 2 seconds:
Ext.Function.defer(sayHi, 2000, this, ['Fred']);

// this syntax is sometimes useful for deferring
// execution of an anonymous function:
Ext.Function.defer(function(){
    alert('Anonymous');
}, 100);

Ext.defer is alias for Ext.Function.defer

Parameters:

Returns:


method define : 'p1 'q1 'r1.
Js.js_string Js.t ->
'p1 Js.t -> 'q1 Js.callback -> (#Ext_Base.t as 'r1) Js.t Js.meth

Defines a class or override. A basic class is defined like this:

 Ext.define('My.awesome.Class', {
     someProperty: 'something',

     someMethod: function(s) {
         alert(s + this.someProperty);
     }

     ...
 });

 var obj = new My.awesome.Class();

 obj.someMethod('Say '); // alerts 'Say something'

To create an anonymous class, pass null for the className:

 Ext.define(null, {
     constructor: function () {
         // ...
     }
 });

In some cases, it is helpful to create a nested scope to contain some private properties. The best way to do this is to pass a function instead of an object as the second parameter. This function will be called to produce the class body:

 Ext.define('MyApp.foo.Bar', function () {
     var id = 0;

     return {
         nextId: function () {
             return ++id;
         }
     };
 });

Note that when using override, the above syntax will not override successfully, because the passed function would need to be executed first to determine whether or not the result is an override or defining a new object. As such, an alternative syntax that immediately invokes the function can be used:

 Ext.define('MyApp.override.BaseOverride', function () {
     var counter = 0;

     return {
         override: 'Ext.Component',
         logId: function () {
             console.log(++counter, this.id);
         }
     };
 }());

When using this form of Ext.define, the function is passed a reference to its class. This can be used as an efficient way to access any static properties you may have:

 Ext.define('MyApp.foo.Bar', function (Bar) {
     return {
         statics: {
             staticMethod: function () {
                 // ...
             }
         },

         method: function () {
             return Bar.staticMethod();
         }
     };
 });

To define an override, include the override property. The content of an override is aggregated with the specified class in order to extend or modify that class. This can be as simple as setting default property values or it can extend and/or replace methods. This can also extend the statics of the class.

One use for an override is to break a large class into manageable pieces.

 // File: /src/app/Panel.js

 Ext.define('My.app.Panel', {
     extend: 'Ext.panel.Panel',
     requires: [
         'My.app.PanelPart2',
         'My.app.PanelPart3'
     ]

     constructor: function (config) {
         this.callParent(arguments); // calls Ext.panel.Panel's constructor
         //...
     },

     statics: {
         method: function () {
             return 'abc';
         }
     }
 });

 // File: /src/app/PanelPart2.js
 Ext.define('My.app.PanelPart2', {
     override: 'My.app.Panel',

     constructor: function (config) {
         this.callParent(arguments); // calls My.app.Panel's constructor
         //...
     }
 });

Another use of overrides is to provide optional parts of classes that can be independently required. In this case, the class may even be unaware of the override altogether.

 Ext.define('My.ux.CoolTip', {
     override: 'Ext.tip.ToolTip',

     constructor: function (config) {
         this.callParent(arguments); // calls Ext.tip.ToolTip's constructor
         //...
     }
 });

The above override can now be required as normal.

 Ext.define('My.app.App', {
     requires: [
         'My.ux.CoolTip'
     ]
 });

Overrides can also contain statics:

 Ext.define('My.app.BarMod', {
     override: 'Ext.foo.Bar',

     statics: {
         method: function (x) {
             return this.callParent([x * 2]); // call Ext.foo.Bar.method
         }
     }
 });

IMPORTANT: An override is only included in a build if the class it overrides is required. Otherwise, the override, like the target class, is not included.

Parameters:


method deprecate : 's1 't1.
Js.js_string Js.t ->
Js.js_string Js.t -> 's1 Js.callback -> 't1 Js.t -> unit Js.meth

Create a closure for deprecated code.

// This means Ext.oldMethod is only supported in 4.0.0beta and older.
// If Ext.getVersion('extjs') returns a version that is later than '4.0.0beta', for example '4.0.0RC',
// the closure will not be invoked
Ext.deprecate('extjs', '4.0.0beta', function() {
    Ext.oldMethod = Ext.newMethod;

    ...
});

Parameters:


method destroy : 'u1. 'u1 Js.t -> unit Js.meth

Attempts to destroy any objects passed to it by removing all event listeners, removing them from the DOM (if applicable) and calling their destroy functions (if available). This method is primarily intended for arguments of type Ext.Element and Ext.Component, but any subclass of Ext.util.Observable can be passed in. Any number of elements and/or components can be passed into this function in a single call as separate arguments.

Parameters:


method destroyMembers : 'v1. 'v1 Js.t -> Js.js_string Js.t -> unit Js.meth

Attempts to destroy and then remove a set of named properties of the passed object.

Parameters:


method each : 'w1 'x1 'y1.
'w1 Js.t ->
'x1 Js.callback ->
'y1 Js.t Js.optdef -> bool Js.t Js.optdef -> bool Js.t Js.meth

Iterates an array or an iterable value and invoke the given callback function for each item.

var countries = ['Vietnam', 'Singapore', 'United States', 'Russia'];

Ext.Array.each(countries, function(name, index, countriesItSelf) {
    console.log(name);
});

var sum = function() {
    var sum = 0;

    Ext.Array.each(arguments, function(value) {
        sum += value;
    });

    return sum;
};

sum(1, 2, 3); // returns 6

The iteration can be stopped by returning false in the function callback.

Ext.Array.each(countries, function(name, index, countriesItSelf) {
    if (name === 'Singapore') {
        return false; // break here
    }
});

Ext.each is alias for Ext.Array.each

Parameters:

Returns:


method encode : 'z1. 'z1 Js.t -> Js.js_string Js.t Js.meth

Shorthand for Ext.JSON.encode

Encodes an Object, Array or other value.

If the environment's native JSON encoding is not being used (USE_NATIVE_JSON is not set, or the environment does not support it), then ExtJS's encoding will be used. This allows the developer to add a toJSON method to their classes which need serializing to return a valid JSON representation of the object.

Parameters:

Returns:


method exclude : 'a2 'b2. 'a2 Js.js_array Js.t -> 'b2 Js.t Js.meth

Convenient shortcut to Ext.Loader.exclude

Explicitly exclude files from being loaded. Useful when used in conjunction with a broad include expression. Can be chained with more require and exclude methods, eg:

Ext.exclude('Ext.data.*').require('*');

Ext.exclude('widget.button*').require('widget.*');

exclude is alias for Ext.Loader.exclude.

Parameters:


method fly : 'c2.
'c2 Js.t ->
Js.js_string Js.t Js.optdef -> Ext_dom_Element_Fly.t Js.t Js.meth

Gets the singleton flyweight element, with the passed node as the active element.

Because it is a singleton, this Flyweight does not have an ID, and must be used and discarded in a single line. You may not keep and use the reference to this singleton over multiple lines because methods that you call may themselves make use of fly and may change the DOM element to which the instance refers.

fly is alias for Ext.dom.AbstractElement.fly.

Use this to make one-time references to DOM elements which are not going to be accessed again either by application code, or by Ext's classes. If accessing an element which will be processed regularly, then Ext.get will be more appropriate to take advantage of the caching provided by the Ext.dom.Element class.

Parameters:

Returns:


method get : 'd2. 'd2 Js.t -> Ext_dom_Element.t Js.t Js.meth

Retrieves Ext.dom.Element objects. get is alias for Ext.dom.Element.get.

This method does not retrieve Components. This method retrieves Ext.dom.Element objects which encapsulate DOM elements. To retrieve a Component by its ID, use Ext.ComponentManager.get.

When passing an id, it should not include the # character that is used for a css selector.

// For an element with id 'foo'
Ext.get('foo'); // Correct
Ext.get('#foo'); // Incorrect

Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

Parameters:

Returns:


method getBody : Ext_dom_Element.t Js.t Js.meth

Returns the current document body as an Ext.Element.


method getClass : 'e2. 'e2 Js.t -> Ext_Class.t Js.t Js.meth

Get the class of the provided object; returns null if it's not an instance of any class created with Ext.define.

Ext.ClassManager.getClass is usually invoked by the shorthand getClass.

var component = new Ext.Component();

Ext.getClass(component); // returns Ext.Component

Parameters:


method getClassName : 'f2. 'f2 Js.t -> Js.js_string Js.t Js.meth

Get the name of the class by its reference or its instance;

Ext.ClassManager.getName is usually invoked by the shorthand getClassName.

Ext.getName(Ext.Action); // returns "Ext.Action"

Parameters:


method getCmp : 'g2. Js.js_string Js.t -> 'g2 Js.t Js.meth

This is shorthand reference to Ext.ComponentManager.get. Looks up an existing Component by id

Parameters:


method getDoc : Ext_dom_Element.t Js.t Js.meth

Returns the current HTML document object as an Ext.Element.


method getDom : 'h2 'i2. 'h2 Js.t -> 'i2 Js.t Js.meth

Returns the dom node for the passed String (id), dom node, or Ext.Element. Optional 'strict' flag is needed for IE since it can return 'name' and 'id' elements by using getElementById.

Here are some examples:

// gets dom node based on id
var elDom = Ext.getDom('elId');
// gets dom node based on the dom node
var elDom1 = Ext.getDom(elDom);

// If we don't know if we are working with an
// Ext.Element or a dom node use Ext.getDom
function(el){
    var dom = Ext.getDom(el);
    // do something with the dom node
}

Note: the dom node to be found actually needs to exist (be rendered, etc) when this method is called to be successful.

Parameters:

Returns:


method getHead : Ext_dom_Element.t Js.t Js.meth

Returns the current document head as an Ext.Element.


method getNamespace : Js.js_string Js.t -> Js.js_string Js.t Js.meth

Get namespace prefix for a class name.

Parameters:

Returns:


method getOrientation : Js.js_string Js.t Js.meth

Returns the current orientation of the mobile device

Returns:


method getScrollbarSize : 'j2. bool Js.t Js.optdef -> 'j2 Js.t Js.meth

Returns the size of the browser scrollbars. This can differ depending on operating system settings, such as the theme or font size.

Parameters:

Returns:


method getStore : 'k2. 'k2 Js.t -> Ext_data_Store.t Js.t Js.meth

Shortcut to Ext.data.StoreManager.lookup.

Gets a registered Store by id

Parameters:


method getVersion : Js.js_string Js.t Js.optdef -> Ext_Version.t Js.t Js.meth

Get the version number of the supplied package name; will return the last registered version (last Ext.setVersion call) if there's no package name given.

Parameters:

Returns:


method id : 'l2.
'l2 Js.t Js.optdef ->
Js.js_string Js.t Js.optdef -> Js.js_string Js.t Js.meth

Generates unique ids. If the element already has an id, it is unchanged

Parameters:

Returns:


method identityFn : 'm2. 'm2 Js.t -> unit Js.meth

A reusable identity function. The function will always return the first argument, unchanged.

Parameters:


method isArray : 'n2. 'n2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a JavaScript Array, false otherwise.

Parameters:


method isBoolean : 'o2. 'o2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a boolean.

Parameters:


method isDate : 'p2. 'p2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a JavaScript Date object, false otherwise.

Parameters:


method isDefined : 'q2. 'q2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is defined.

Parameters:


method isElement : 'r2. 'r2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is an HTMLElement

Parameters:


method isEmpty : 's2. 's2 Js.t -> bool Js.t Js.optdef -> bool Js.t Js.meth

Returns true if the passed value is empty, false otherwise. The value is deemed to be empty if it is either:

Parameters:


method isFunction : 't2. 't2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a JavaScript Function, false otherwise.

Parameters:


method isIterable : 'u2. 'u2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is iterable, that is, if elements of it are addressable using array notation with numeric indices, false otherwise.

Arrays and function arguments objects are iterable. Also HTML collections such as NodeList and `HTMLCollection' are iterable.

Parameters:


method isNumber : 'v2. 'v2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a number. Returns false for non-finite numbers.

Parameters:


method isNumeric : 'w2. 'w2 Js.t -> bool Js.t Js.meth

Validates that a value is numeric.

Parameters:

Returns:


method isObject : 'x2. 'x2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a JavaScript Object, false otherwise.

Parameters:


method isPrimitive : 'y2. 'y2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a JavaScript 'primitive', a string, number or boolean.

Parameters:


method isString : 'z2. 'z2 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a string.

Parameters:


method isTextNode : 'a3. 'a3 Js.t -> bool Js.t Js.meth

Returns true if the passed value is a TextNode

Parameters:


method iterate : 'b3 'c3 'd3.
'b3 Js.t -> 'c3 Js.callback -> 'd3 Js.t Js.optdef -> unit Js.meth

Iterates either an array or an object. This method delegates to Ext.Array.each if the given value is iterable, and Ext.Object.each otherwise.

Parameters:


method log : 'e3. 'e3 Js.t Js.optdef -> Js.js_string Js.t Js.optdef -> unit Js.meth

Logs a message. If a console is present it will be used. On Opera, the method "opera.postError" is called. In other cases, the message is logged to an array "Ext.log.out". An attached debugger can watch this array and view the log. The log buffer is limited to a maximum of "Ext.log.max" entries (defaults to 250). The Ext.log.out array can also be written to a popup window by entering the following in the URL bar (a "bookmarklet"):

javascript:void(Ext.log.show());

If additional parameters are passed, they are joined and appended to the message. A technique for tracing entry and exit of a function is this:

function foo () {
    Ext.log({ indent: 1 }, '>> foo');

    // log statements in here or methods called from here will be indented
    // by one step

    Ext.log({ outdent: 1 }, '<< foo');
}

This method does nothing in a release build.

Parameters:


method merge : 'f3 'g3 'h3. 'f3 Js.t -> 'g3 Js.t -> 'h3 Js.t Js.meth

A convenient alias method for Ext.Object.merge.

Merges any number of objects recursively without referencing them or their children.

var extjs = {
    companyName: 'Ext JS',
    products: ['Ext JS', 'Ext GWT', 'Ext Designer'],
    isSuperCool: true,
    office: {
        size: 2000,
        location: 'Palo Alto',
        isFun: true
    }
};

var newStuff = {
    companyName: 'Sencha Inc.',
    products: ['Ext JS', 'Ext GWT', 'Ext Designer', 'Sencha Touch', 'Sencha Animator'],
    office: {
        size: 40000,
        location: 'Redwood City'
    }
};

var sencha = Ext.Object.merge(extjs, newStuff);

// extjs and sencha then equals to
{
    companyName: 'Sencha Inc.',
    products: ['Ext JS', 'Ext GWT', 'Ext Designer', 'Sencha Touch', 'Sencha Animator'],
    isSuperCool: true,
    office: {
        size: 40000,
        location: 'Redwood City',
        isFun: true
    }
}

Parameters:

Returns:


method namespace : 'i3. Js.js_string Js.t -> 'i3 Js.t Js.meth

Creates namespaces to be used for scoping variables and classes so that they are not global. Specifying the last node of a namespace implicitly creates all other nodes. Usage:

Ext.namespace('Company', 'Company.data');

// equivalent and preferable to the above syntax
Ext.ns('Company.data');

Company.Widget = function() { ... };

Company.data.CustomStore = function(config) { ... };

Parameters:

Returns:


method ns : 'j3. Js.js_string Js.t -> 'j3 Js.t Js.meth

Convenient alias for Ext.namespace.

Creates namespaces to be used for scoping variables and classes so that they are not global. Specifying the last node of a namespace implicitly creates all other nodes. Usage:

Ext.namespace('Company', 'Company.data');

// equivalent and preferable to the above syntax
Ext.ns('Company.data');

Company.Widget = function() { ... };

Company.data.CustomStore = function(config) { ... };

Parameters:

Returns:


method on : 'k3 'l3 'm3 'n3 'o3.
'k3 Js.t ->
'l3 Js.callback Js.optdef ->
'm3 Js.t Js.optdef -> 'n3 Js.t Js.optdef -> 'o3 Js.t Js.meth

Shorthand for the Ext.util.Observable.addListener method of the globalEvents Observable instance.

Appends an event handler to this object. For example:

myGridPanel.on("mouseover", this.onMouseOver, this);

The method also allows for a single argument to be passed which is a config object containing properties which specify multiple events. For example:

myGridPanel.on({
    cellClick: this.onCellClick,
    mouseover: this.onMouseOver,
    mouseout: this.onMouseOut,
    scope: this // Important. Ensure "this" is correct during handler execution
});

One can also specify options for each event handler separately:

myGridPanel.on({
    cellClick: {fn: this.onCellClick, scope: this, single: true},
    mouseover: {fn: panel.onMouseOver, scope: panel}
});

Names of methods in a specified scope may also be used. Note that scope MUST be specified to use this option:

myGridPanel.on({
    cellClick: {fn: 'onCellClick', scope: this, single: true},
    mouseover: {fn: 'onMouseOver', scope: panel}
});

Parameters:

Returns:


method onDocumentReady : 'p3 'q3 'r3.
'p3 Js.callback -> 'q3 Js.t Js.optdef -> 'r3 Js.t Js.optdef -> unit Js.meth

Adds a listener to be notified when the document is ready (before onload and before images are loaded).

onDocumentReady is an alias for Ext.EventManager.onDocumentReady.

Parameters:


method onReady : 's3 't3 'u3. 's3 Js.callback -> 't3 Js.t -> 'u3 Js.t -> unit Js.meth

Adds a function to be called when the DOM is ready, and all required classes have been loaded.

If the DOM is ready and all classes are loaded, the passed function is executed immediately.

Parameters:


method override : 'v3 'w3. 'v3 Js.t -> 'w3 Js.t -> unit Js.meth

Overrides members of the specified target with the given values.

If the target is a class declared using Ext.define, the override method of that class is called (see Ext.Base.override) given the overrides.

If the target is a function, it is assumed to be a constructor and the contents of overrides are applied to its prototype using Ext.apply.

If the target is an instance of a class declared using Ext.define, the overrides are applied to only that instance. In this case, methods are specially processed to allow them to use Ext.Base.callParent.

 var panel = new Ext.Panel({ ... });

 Ext.override(panel, {
     initComponent: function () {
         // extra processing...

         this.callParent();
     }
 });

If the target is none of these, the overrides are applied to the target using Ext.apply.

Please refer to Ext.define and Ext.Base.override for further details.

Parameters:


method pass : 'x3 'y3 'z3 'a4.
'x3 Js.callback ->
'y3 Js.js_array Js.t -> 'z3 Js.t Js.optdef -> 'a4 Js.callback Js.meth

Create a new function from the provided fn, the arguments of which are pre-set to args. New arguments passed to the newly created callback when it's invoked are appended after the pre-set ones. This is especially useful when creating callbacks.

For example:

var originalFunction = function(){
    alert(Ext.Array.from(arguments).join(' '));
};

var callback = Ext.Function.pass(originalFunction, ['Hello', 'World']);

callback(); // alerts 'Hello World'
callback('by Me'); // alerts 'Hello World by Me'

Ext.pass is alias for Ext.Function.pass

Parameters:

Returns:


method preg : 'b4. Js.js_string Js.t -> 'b4 Js.callback -> unit Js.meth

Shorthand for Ext.PluginManager.registerType

Parameters:


method query : Js.js_string Js.t ->
Dom_html.element Js.t Js.optdef ->
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> Dom_html.element Js.t Js.js_array Js.t Js.meth

Shorthand of Ext.dom.Query.select

Selects an array of DOM nodes by CSS/XPath selector.

Uses document.querySelectorAll if browser supports that, otherwise falls back to Ext.dom.Query.jsSelect to do the work.

Aliased as query.

Parameters:

Returns:


method regStore : 'c4. Js.js_string Js.t -> 'c4 Js.t -> unit Js.meth

Creates a new store for the given id and config, then registers it with the Store Manager. Sample usage:

Ext.regStore('AllUsers', {
    model: 'User'
});

// the store can now easily be used throughout the application
new Ext.List({
    store: 'AllUsers',
    ... other config
});

Parameters:


method removeNode : Dom_html.element Js.t -> unit Js.meth

Removes a DOM node from the document.

Removes this element from the document, removes all DOM event listeners, and deletes the cache reference. All DOM event listeners are removed from this element. If Ext.enableNestedListenerRemoval is true, then DOM event listeners are also removed from all child nodes. The body node will be ignored if passed in.

Parameters:


method require : 'd4 'e4 'f4 'g4.
'd4 Js.t ->
'e4 Js.callback Js.optdef ->
'f4 Js.t Js.optdef -> 'g4 Js.t Js.optdef -> unit Js.meth

Loads all classes by the given names and all their direct dependencies; optionally executes the given callback function when finishes, within the optional scope.

require is alias for Ext.Loader.require.

Parameters:


method resumeLayouts : 'h4. 'h4 Js.t -> unit Js.meth
method select : Js.js_string Js.t ->
bool Js.t Js.optdef -> Ext_dom_CompositeElement.t Js.t Js.meth

Shorthand of Ext.Element.select.

Creates a Ext.CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method setGlyphFontFamily : Js.js_string Js.t -> unit Js.meth

Sets the default font-family to use for components that support a glyph config.

Parameters:


method setVersion : 'i4 'j4. Js.js_string Js.t -> 'i4 Js.t -> 'j4 Js.t Js.meth

Set version number for the given package name.

Parameters:


method suspendLayouts : unit Js.meth
method syncRequire : 'k4 'l4 'm4 'n4.
'k4 Js.t ->
'l4 Js.callback Js.optdef ->
'm4 Js.t Js.optdef -> 'n4 Js.t Js.optdef -> unit Js.meth

Synchronously loads all classes by the given names and all their direct dependencies; optionally executes the given callback function when finishes, within the optional scope.

syncRequire is alias for Ext.Loader.syncRequire.

Parameters:


method toArray : 'o4 'p4.
'o4 Js.t ->
Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> 'p4 Js.js_array Js.t Js.meth

Converts any iterable (numeric indices and a length property) into a true array.

function test() {
    var args = Ext.Array.toArray(arguments),
        fromSecondToLastArgs = Ext.Array.toArray(arguments, 1);

    alert(args.join(' '));
    alert(fromSecondToLastArgs.join(' '));
}

test('just', 'testing', 'here'); // alerts 'just testing here';
                                 // alerts 'testing here';

Ext.Array.toArray(document.getElementsByTagName('div')); // will convert the NodeList into an array
Ext.Array.toArray('splitted'); // returns ['s', 'p', 'l', 'i', 't', 't', 'e', 'd']
Ext.Array.toArray('splitted', 0, 3); // returns ['s', 'p', 'l']

Ext.toArray is alias for Ext.Array.toArray

Parameters:

Returns:


method typeOf : 'q4. 'q4 Js.t -> Js.js_string Js.t Js.meth

Returns the type of the given variable in string format. List of possible values are:

Parameters:


method un : 'r4 's4.
Js.js_string Js.t -> 'r4 Js.callback -> 's4 Js.t Js.optdef -> unit Js.meth

Shorthand for the Ext.util.Observable.removeListener method of the globalEvents Observable instance.

Removes an event handler.

Parameters:


method valueFrom : 't4 'u4 'v4. 't4 Js.t -> 'u4 Js.t -> bool Js.t Js.optdef -> 'v4 Js.t Js.meth

Returns the given value itself if it's not empty, as described in isEmpty; returns the default value (second argument) otherwise.

Parameters:

Returns:


method widget : 'w4 'x4.
Js.js_string Js.t Js.optdef -> 'w4 Js.t Js.optdef -> 'x4 Js.t Js.meth

Convenient shorthand to create a widget by its xtype or a config object. See also Ext.ClassManager.instantiateByAlias.

 var button = Ext.widget('button'); // Equivalent to Ext.create('widget.button');

 var panel = Ext.widget('panel', { // Equivalent to Ext.create('widget.panel')
     title: 'Panel'
 });

 var grid = Ext.widget({
     xtype: 'grid',
     ...
 });

If a component instance is passed, it is simply returned.

Parameters:

Returns: