class type t =object..end
method history : 'a. 'a Js.js_array Js.t Js.propAn array of class names to keep track of the dependency loading order. This is not guaranteed to be the same everytime due to the asynchronous nature of the Loader.
method addClassPathMappings : 'b.
'b Js.t ->
(< addClassPathMappings : 'b. 'c;
exclude : 'e 'f. 'e Js.js_array Js.t -> 'f Js.t Js.meth;
getConfig : 'g. Js.js_string Js.t -> 'g Js.t Js.meth;
getPath : Js.js_string Js.t -> Js.js_string Js.t Js.meth;
history : 'a. 'a Js.js_array Js.t Js.prop;
loadScript : 'h. 'h Js.t -> unit Js.meth;
onReady : 'i 'j. 'i Js.callback -> 'j Js.t -> bool Js.t -> unit Js.meth;
require : 'k 'l 'm 'n.
'k Js.t ->
'l Js.callback Js.optdef ->
'm Js.t Js.optdef -> 'n Js.t Js.optdef -> unit Js.meth;
setConfig : 'o. 'o Js.t -> 'd Js.t Js.meth;
setPath : 'p. 'p Js.t -> Js.js_string Js.t Js.optdef -> 'd Js.t Js.meth;
syncRequire : 'q 'r 's 't.
'q Js.t ->
'r Js.callback Js.optdef ->
's Js.t Js.optdef -> 't Js.t Js.optdef -> unit Js.meth;
.. >
as 'd)
Js.t Js.meth as 'cSets a batch of path entries
Parameters:
_ Js.t
a set of className: path mappings
Returns:
Ext_Loader.t Js.t this
method exclude : 'e 'f. 'e Js.js_array Js.t -> 'f Js.t Js.methExplicitly 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.*');
Ext.exclude is alias for exclude.
Parameters:
_ Js.js_array Js.t
Returns:
_ Js.t
object contains require method for chaining
method getConfig : 'g. Js.js_string Js.t -> 'g Js.t Js.methGet the config value corresponding to the specified name. If no name is given, will return the config object
Parameters:
Js.js_string Js.t
The config property name
method getPath : Js.js_string Js.t -> Js.js_string Js.t Js.methTranslates a className to a file path by adding the the proper prefix and converting the .'s to /'s. For example:
Ext.Loader.setPath('My', '/path/to/My');
alert(Ext.Loader.getPath('My.awesome.Class')); // alerts '/path/to/My/awesome/Class.js'
Note that the deeper namespace levels, if explicitly set, are always resolved first. For example:
Ext.Loader.setPath({
'My': '/path/to/lib',
'My.awesome': '/other/path/for/awesome/stuff',
'My.awesome.more': '/more/awesome/path'
});
alert(Ext.Loader.getPath('My.awesome.Class')); // alerts '/other/path/for/awesome/stuff/Class.js'
alert(Ext.Loader.getPath('My.awesome.more.Class')); // alerts '/more/awesome/path/Class.js'
alert(Ext.Loader.getPath('My.cool.Class')); // alerts '/path/to/lib/cool/Class.js'
alert(Ext.Loader.getPath('Unknown.strange.Stuff')); // alerts 'Unknown/strange/Stuff.js'
Parameters:
Js.js_string Js.t
Returns:
Js.js_string Js.t path
method loadScript : 'h. 'h Js.t -> unit Js.methLoads the specified script URL and calls the supplied callbacks. If this method is called before Ext.isReady, the script's load will delay the transition to ready. This can be used to load arbitrary scripts that may contain further Ext.require calls.
Parameters:
_ Js.t
The options object or simply the URL to load.
method onReady : 'i 'j. 'i Js.callback -> 'j Js.t -> bool Js.t -> unit Js.methAdd a new listener to be executed when all required scripts are fully loaded
Parameters:
_ Js.callback
The function callback to be executed
_ Js.t
The execution scope (this) of the callback function
bool Js.t
Whether or not to wait for document dom ready as well
method require : 'k 'l 'm 'n.
'k Js.t ->
'l Js.callback Js.optdef ->
'm Js.t Js.optdef -> 'n Js.t Js.optdef -> unit Js.methLoads all classes by the given names and all their direct dependencies; optionally executes the given callback function when finishes, within the optional scope.
Ext.require is alias for require.
Parameters:
_ Js.t
Can either be a string or an array of string
_ Js.callback (optional)
The callback function
_ Js.t (optional)
The execution scope (this) of the callback function
_ Js.t (optional)
Classes to be excluded, useful when being used with expressions
method setConfig : 'o. 'o Js.t -> 'd Js.t Js.methSet the configuration for the loader. This should be called right after ext-(debug).js is included in the page, and before Ext.onReady. i.e:
<script type="text/javascript" src="ext-core-debug.js"></script>
<script type="text/javascript">
Ext.Loader.setConfig({
enabled: true,
paths: {
'My': 'my_own_path'
}
});
</script>
<script type="text/javascript">
Ext.require(...);
Ext.onReady(function() {
// application code here
});
</script>
Refer to config options of Ext.Loader for the list of possible properties
Parameters:
_ Js.t
The config object to override the default values
Returns:
Ext_Loader.t Js.t this
method setPath : 'p. 'p Js.t -> Js.js_string Js.t Js.optdef -> 'd Js.t Js.methSets the path of a namespace. For Example:
Ext.Loader.setPath('Ext', '.');
Parameters:
_ Js.t
See flexSetter
Js.js_string Js.t (optional)
See flexSetter
Returns:
Ext_Loader.t Js.t this
method syncRequire : 'q 'r 's 't.
'q Js.t ->
'r Js.callback Js.optdef ->
's Js.t Js.optdef -> 't Js.t Js.optdef -> unit Js.methSynchronously loads all classes by the given names and all their direct dependencies; optionally executes the given callback function when finishes, within the optional scope.
Ext.syncRequire is alias for syncRequire.
Parameters:
_ Js.t
Can either be a string or an array of string
_ Js.callback (optional)
The callback function
_ Js.t (optional)
The execution scope (this) of the callback function
_ Js.t (optional)
Classes to be excluded, useful when being used with expressions