<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
- <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
*
* # Asynchronous Loading
*
- * - *Advantages:*
+ * - Advantages:
* + Cross-domain
* + No web server needed: you can run the application via the file system protocol
* (i.e: `file://path/to/your/index.html`)
* + Best possible debugging experience: error messages come with the exact file name and line number
*
- * - *Disadvantages:*
+ * - Disadvantages:
* + Dependencies need to be specified before-hand
*
* ### Method 1: Explicitly include what you need:
*
* # Synchronous Loading on Demand
*
- * - *Advantages:*
+ * - Advantages:
* + There's no need to specify dependencies before-hand, which is always the convenience of including
* ext-all.js before
*
- * - *Disadvantages:*
+ * - Disadvantages:
* + Not as good debugging experience since file name won't be shown (except in Firebug at the moment)
* + Must be from the same domain due to XHR restriction
* + Need a web server, same reason as above
* It has all the advantages combined from asynchronous and synchronous loading. The development flow is simple:
*
* ### Step 1: Start writing your application using synchronous approach.
- *
+ *
* Ext.Loader will automatically fetch all dependencies on demand as they're needed during run-time. For example:
*
* Ext.onReady(function(){
classNameToFilePathMap: {},
<span id='Ext-Loader-property-history'> /**
-</span> * @property {[String]} history
+</span> * @property {String[]} history
* An 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.
*/
config: {
<span id='Ext-Loader-cfg-enabled'> /**
</span> * @cfg {Boolean} enabled
- * Whether or not to enable the dynamic dependency loading feature Defaults to false
+ * Whether or not to enable the dynamic dependency loading feature.
*/
enabled: false,
<span id='Ext-Loader-cfg-disableCaching'> /**
</span> * @cfg {Boolean} disableCaching
- * Appends current timestamp to script files to prevent caching Defaults to true
+ * Appends current timestamp to script files to prevent caching.
*/
disableCaching: true,
<span id='Ext-Loader-cfg-disableCachingParam'> /**
</span> * @cfg {String} disableCachingParam
- * The get parameter name for the cache buster's timestamp. Defaults to '_dc'
+ * The get parameter name for the cache buster's timestamp.
*/
disableCachingParam: '_dc',
</span> * Get the config value corresponding to the specified name.
* If no name is given, will return the config object.
* @param {String} name The config property name
- * @return {Object/Mixed}
+ * @return {Object}
*/
getConfig: function(name) {
if (name) {
*
* @param {String} url
* @param {Function} onLoad
- * @param {Scope} scope
+ * @param {Object} scope
* @param {Boolean} synchronous
* @private
*/
*
* {@link Ext#exclude Ext.exclude} is alias for {@link Ext.Loader#exclude Ext.Loader.exclude} for convenience.
*
- * @param {String/[String]} excludes
+ * @param {String/String[]} excludes
* @return {Object} object contains `require` method for chaining
*/
exclude: function(excludes) {
*
* {@link Ext#syncRequire Ext.syncRequire} is alias for {@link Ext.Loader#syncRequire Ext.Loader.syncRequire} for convenience.
*
- * @param {String/[String]} expressions Can either be a string or an array of string
+ * @param {String/String[]} expressions Can either be a string or an array of string
* @param {Function} fn (Optional) The callback function
* @param {Object} scope (Optional) The execution scope (`this`) of the callback function
- * @param {String/[String]} excludes (Optional) Classes to be excluded, useful when being used with expressions
+ * @param {String/String[]} excludes (Optional) Classes to be excluded, useful when being used with expressions
*/
syncRequire: function() {
this.syncModeEnabled = true;
*
* {@link Ext#require Ext.require} is alias for {@link Ext.Loader#require Ext.Loader.require} for convenience.
*
- * @param {String/[String]} expressions Can either be a string or an array of string
+ * @param {String/String[]} expressions Can either be a string or an array of string
* @param {Function} fn (Optional) The callback function
* @param {Object} scope (Optional) The execution scope (`this`) of the callback function
- * @param {String/[String]} excludes (Optional) Classes to be excluded, useful when being used with expressions
+ * @param {String/String[]} excludes (Optional) Classes to be excluded, useful when being used with expressions
*/
require: function(expressions, fn, scope, excludes) {
var filePath, expression, exclude, className, excluded = {},
};
<span id='Ext-Class-cfg-requires'> /**
-</span> * @cfg {[String]} requires
+</span> * @cfg {String[]} requires
* @member Ext.Class
- * List of classes that have to be loaded before instanciating this class.
+ * List of classes that have to be loaded before instantiating this class.
* For example:
*
* Ext.define('Mother', {
}
}
}
- else {
+ else if (typeof propertyValue != 'function') {
for (j in propertyValue) {
if (propertyValue.hasOwnProperty(j)) {
value = propertyValue[j];
}
}
}
- else {
+ else if (typeof propertyValue != 'function') {
for (var k in propertyValue) {
if (propertyValue.hasOwnProperty(k)) {
value = propertyValue[k];
Class.setDefaultPreprocessorPosition('loader', 'after', 'className');
<span id='Ext-Class-cfg-uses'> /**
-</span> * @cfg {[String]} uses
+</span> * @cfg {String[]} uses
* @member Ext.Class
* List of classes to load together with this class. These aren't neccessarily loaded before
- * this class is instanciated. For example:
+ * this class is instantiated. For example:
*
* Ext.define('Mother', {
* uses: ['Child'],