2
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3
Code licensed under the BSD License:
4
http://developer.yahoo.net/yui/license.txt
8
* Loader dynamically loads script and css files. It includes the dependency
9
* info for the version of the library in use, and will automatically pull in
10
* dependencies for the modules requested. It supports rollup files and will
11
* automatically use these when appropriate in order to minimize the number of
12
* http connections required to load all of the dependencies. It can load the
13
* files from the Yahoo! CDN, and it can utilize the combo service provided on
14
* this network to reduce the number of http connections required to download
22
* Loader dynamically loads script and css files. It includes the dependency
23
* info for the version of the library in use, and will automatically pull in
24
* dependencies for the modules requested. It supports rollup files and will
25
* automatically use these when appropriate in order to minimize the number of
26
* http connections required to load all of the dependencies. It can load the
27
* files from the Yahoo! CDN, and it can utilize the combo service provided on
28
* this network to reduce the number of http connections required to download
32
* @param o an optional set of configuration options. Valid options:
37
* The secure base dir (not implemented)</li>
39
* The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?</li>
41
* The root path to prepend to module names for the combo service. Ex: 2.5.2/build/</li>
44
* A filter to apply to result urls. This filter will modify the default
45
* path for all modules. The default path for the YUI library is the
46
* minified version of the files (e.g., event-min.js). The filter property
47
* can be a predefined filter or a custom filter. The valid predefined
51
* <dd>Selects the debug versions of the library (e.g., event-debug.js).
52
* This option will automatically include the logger widget</dd>
54
* <dd>Selects the non-minified version of the library (e.g., event.js).</dd>
56
* You can also define a custom filter, which must be an object literal
57
* containing a search expression and a replace string:
60
* 'searchExp': "-min\\.js",
61
* 'replaceStr': "-debug.js"
67
* Use the YUI combo service to reduce the number of http connections required to load your dependencies</li>
69
* A list of modules that should never be dynamically loaded</li>
71
* A list of modules that should always be loaded when required, even if already present on the page</li>
73
* Node or id for a node that should be used as the insertion point for new nodes</li>
75
* charset for dynamic nodes</li>
77
* number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout</li>
79
* execution context for all callbacks</li>
81
* callback for the 'success' event</li>
83
* callback for the 'failure' event</li>
85
* callback for the 'timeout' event</li>
87
* callback executed each time a script or css file is loaded</li>
89
* A list of module definitions. See Loader.addModule for the supported module metadata</li>
93
// @TODO backed out the custom event changes so that the event system
94
// isn't required in the seed build. If needed, we may want to
95
// add them back if the event system is detected.
98
* Executed when the loader successfully completes an insert operation
99
* This can be subscribed to normally, or a listener can be passed
100
* as an onSuccess config option.
105
* Executed when the loader fails to complete an insert operation.
106
* This can be subscribed to normally, or a listener can be passed
107
* as an onFailure config option.
113
* Executed when a Get operation times out.
114
* This can be subscribed to normally, or a listener can be passed
115
* as an onTimeout config option.
120
// http://yui.yahooapis.com/combo?2.5.2/build/yahoo/yahoo-min.js&2.5.2/build/dom/dom-min.js&2.5.2/build/event/event-min.js&2.5.2/build/autocomplete/autocomplete-min.js"
122
YUI.add("loader", function(Y) {
127
CSSRESET = 'cssreset',
128
CSSFONTS = 'cssfonts',
129
CSSGRIDS = 'cssgrids',
131
CSS_AFTER = [CSSRESET, CSSFONTS, CSSGRIDS, 'cssreset-context', 'cssfonts-context', 'cssgrids-context'],
132
YUI_CSS = ['reset', 'fonts', 'grids', 'base'],
133
VERSION = '3.0.0pr1',
134
ROOT = VERSION + '/build/',
135
CONTEXT = '-context',
142
base: 'http://yui.yahooapis.com/' + ROOT,
144
comboBase: 'http://yui.yahooapis.com/combo?',
155
requires: ['dom-base']
159
requires: ['dom-base', 'dom-style']
162
requires: ['dom-base']
171
requires: ['dom-base', 'selector']
174
requires: ['dom-style', 'node-base']
177
requires: ['dom-screen', 'node-base']
183
requires: [BASE, 'node'],
186
requires: ['base', 'node-style']
189
requires: ['anim-base']
192
requires: ['anim-xy']
197
requires: ['anim-base']
200
requires: ['anim-base', 'node-screen']
202
'anim-node-plugin': {
203
requires: ['node', 'anim-base']
213
requires: ['attribute']
222
// Note: CSS attributes are modified programmatically to reduce metadata size
228
// requires: [CSSFONTS],
229
// optional: [CSSRESET]
235
requires: ['node', BASE]
238
requires: ['dd-ddm-base']
244
requires: ['dd-ddm-base']
247
requires: ['dd-ddm-drop']
250
requires: ['dd-drag']
253
requires: ['dd-drag', 'dd-proxy']
256
requires: ['dd-drag'],
257
optional: ['dd-constrain', 'dd-proxy']
260
requires: ['dd-drop']
290
requires: ['yui-base']
299
// Since YUI is required for everything else, it should not be specified as
302
supersedes: ['yui-base', 'get', 'loader']
309
var _path = function(dir, file, type) {
310
return dir + '/' + file + '-min.' + (type || CSS);
313
var _cssmeta = function() {
314
var mods = META.modules;
315
// modify the meta info for YUI CSS
316
for (var i=0; i<YUI_CSS.length; i=i+1) {
317
var bname = YUI_CSS[i],
322
path: _path(mname, bname)
325
// define -context module
326
var contextname = mname + CONTEXT;
327
bname = bname + CONTEXT;
329
mods[contextname] = {
331
path: _path(mname, bname)
334
if (mname == CSSGRIDS) {
335
mods[mname].requires = [CSSFONTS];
336
mods[mname].optional = [CSSRESET];
337
mods[contextname].requires = [CSSFONTS + CONTEXT];
338
mods[contextname].optional = [CSSRESET + CONTEXT];
339
} else if (mname == CSSBASE) {
340
mods[mname].after = CSS_AFTER;
341
mods[contextname].after = CSS_AFTER;
349
var L=Y.Lang, env=Y.Env,
350
PROV = "_provides", SUPER = "_supersedes",
353
Y.Loader = function(o) {
356
* Internal callback to handle multiple internal insert() calls
357
* so that css is inserted prior to js
358
* @property _internalCallback
361
this._internalCallback = null;
364
* Use the YUI environment listener to detect script load. This
365
* is only switched on for Safari 2.x and below.
366
* @property _useYahooListener
369
this._useYahooListener = false;
372
* Callback that will be executed when the loader is finished
377
this.onSuccess = null;
380
* Callback that will be executed if there is a failure
384
this.onFailure = null;
387
* Callback executed each time a script or css file is loaded
391
this.onProgress = null;
394
* Callback that will be executed if a timeout occurs
398
this.onTimeout = null;
401
* The execution context for all callbacks
403
* @default {YUI} the YUI instance
408
* Data that is passed to all callbacks
414
* Node reference or id where new nodes should be inserted before
415
* @property insertBefore
416
* @type string|HTMLElement
418
this.insertBefore = null;
421
* The charset attribute for inserted nodes
429
* The base directory.
432
* @default http://yui.yahooapis.com/[YUI VERSION]/build/
434
this.base = Y.Env.meta.base;
437
* Base path for the combo service
438
* @property comboBase
440
* @default http://yui.yahooapis.com/combo?
442
this.comboBase = Y.Env.meta.comboBase;
445
* If configured, YUI JS resources will use the combo
449
* @default true if a base dir isn't in the config
451
this.combine = (!(BASE in o));
454
* Ignore modules registered on the YUI global
455
* @property ignoreRegistered
458
this.ignoreRegistered = false;
461
* Root path to prepend to module path for the combo
465
* @default [YUI VERSION]/build/
467
this.root = Y.Env.meta.root;
470
* Timeout value in milliseconds. If set, this value will be used by
471
* the get utility. the timeout event will fire if
479
* A list of modules that should not be loaded, even if
480
* they turn up in the dependency tree
487
* A list of modules that should always be loaded, even
488
* if they have already been inserted into the page.
495
* Should we allow rollups
496
* @property allowRollup
500
this.allowRollup = true;
503
* A filter to apply to result urls. This filter will modify the default
504
* path for all modules. The default path for the YUI library is the
505
* minified version of the files (e.g., event-min.js). The filter property
506
* can be a predefined filter or a custom filter. The valid predefined
510
* <dd>Selects the debug versions of the library (e.g., event-debug.js).
511
* This option will automatically include the logger widget</dd>
513
* <dd>Selects the non-minified version of the library (e.g., event.js).</dd>
515
* You can also define a custom filter, which must be an object literal
516
* containing a search expression and a replace string:
519
* 'searchExp': "-min\\.js",
520
* 'replaceStr': "-debug.js"
524
* @type string|{searchExp: string, replaceStr: string}
529
* The list of requested modules
531
* @type {string: boolean}
536
* The library metadata
537
* @property moduleInfo
539
// this.moduleInfo = Y.merge(Y.Env.meta.moduleInfo);
540
this.moduleInfo = {};
542
var defaults = Y.Env.meta.modules;
544
for (var i in defaults) {
545
if (defaults.hasOwnProperty(i)) {
546
this._internal = true;
547
this.addModule(defaults[i], i);
548
this._internal = false;
553
* List of rollup files found in the library metadata
559
* Whether or not to load optional dependencies for
560
* the requested modules
561
* @property loadOptional
565
this.loadOptional = false;
568
* All of the derived dependencies in sorted order, which
569
* will be populated when either calculate() or insert()
577
* Set when beginning to compute the dependency tree.
578
* Composed of what YUI reports to be loaded combined
579
* with what has been loaded by the tool
581
* @type {string: boolean}
586
* A list of modules to attach to the YUI instance when complete.
587
* If not supplied, the sorted list of dependencies are applied.
588
* @property attaching
590
this.attaching = null;
593
* Flag to indicate the dependency tree needs to be recomputed
594
* if insert is called again.
602
* List of modules inserted by the utility
604
* @type {string: boolean}
610
// Y.on('yui:load', this.loadNext, this);
616
Y.Loader.prototype = {
620
'searchExp': "-min\\.js",
624
'searchExp': "-min\\.js",
625
'replaceStr': "-debug.js"
629
_config: function(o) {
631
// apply config values
635
if (o.hasOwnProperty(i)) {
636
if (i == 'require') {
638
// support the old callback syntax
639
// } else if (i.indexOf('on') === 0) {
640
// this.subscribe(i.substr(2).toLowerCase(), o[i], o.context || this);
641
} else if (i == 'modules') {
642
// add a hash of module definitions
644
this.addModule(val[j], j);
662
// the logger must be available in order to use the debug
663
// versions of the library
664
// @TODO review when logreader is available
665
// if (f === "DEBUG") {
666
// this.require("log");
669
this.filter = this.FILTERS[f];
674
/** Add a new module to the component metadata.
676
* <dt>name:</dt> <dd>required, the component name</dd>
677
* <dt>type:</dt> <dd>required, the component type (js or css)</dd>
678
* <dt>path:</dt> <dd>required, the path to the script from "base"</dd>
679
* <dt>requires:</dt> <dd>array of modules required by this component</dd>
680
* <dt>optional:</dt> <dd>array of optional modules for this component</dd>
681
* <dt>supersedes:</dt> <dd>array of the modules this component replaces</dd>
682
* <dt>after:</dt> <dd>array of modules the components which, if present, should be sorted above this one</dd>
683
* <dt>rollup:</dt> <dd>the number of superseded modules required for automatic rollup</dd>
684
* <dt>fullpath:</dt> <dd>If fullpath is specified, this is used instead of the configured base + path</dd>
685
* <dt>skinnable:</dt> <dd>flag to determine if skin assets should automatically be pulled in</dd>
686
* <dt>submodules:</dt> <dd>a has of submodules</dd>
689
* @param o An object containing the module data
690
* @param name the module name (optional), required if not in the module data
691
* @return {boolean} true if the module was added, false if
692
* the object passed in did not provide all required attributes
694
addModule: function(o, name) {
696
name = name || o.name;
707
if (!o.path && !o.fullpath) {
708
// o.path = name + "/" + name + "-min." + o.type;
709
o.path = _path(name, name, o.type);
712
o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
713
o.requires = o.requires || [];
716
// Handle submodule logic
717
var subs = o.submodules;
721
for (var i in subs) {
723
s.path = _path(name, i, o.type);
724
this.addModule(s, i);
730
o.rollup = Math.min(l-1, 4);
733
this.moduleInfo[name] = o;
740
* Add a requirement for one or more module
742
* @param what {string[] | string*} the modules to load
744
require: function(what) {
745
var a = (typeof what === "string") ? arguments : what;
747
Y.mix(this.required, Y.Array.hash(a));
751
* Returns an object containing properties for all modules required
752
* in order to load the requested module
753
* @method getRequires
754
* @param mod The module definition from moduleInfo
756
getRequires: function(mod) {
762
if (!this.dirty && mod.expanded) {
766
var i, d=[], r=mod.requires, o=mod.optional,
767
info=this.moduleInfo, m, j, add;
769
for (i=0; i<r.length; i=i+1) {
771
m = this.getModule(r[i]);
772
add = this.getRequires(m);
773
for (j=0;j<add.length;j=j+1) {
778
// get the requirements from superseded modules, if any
781
for (i=0; i<r.length; i=i+1) {
783
m = this.getModule(r[i]);
784
add = this.getRequires(m);
785
for (j=0;j<add.length;j=j+1) {
791
if (o && this.loadOptional) {
792
for (i=0; i<o.length; i=i+1) {
794
add = this.getRequires(info[o[i]]);
795
for (j=0;j<add.length;j=j+1) {
801
mod.expanded = Y.Object.keys(Y.Array.hash(d));
809
* Returns an object literal of the modules the supplied module satisfies
810
* @method getProvides
811
* @param name{string} The name of the module
812
* @param notMe {string} don't add this module name, only include superseded modules
813
* @return what this module provides
815
getProvides: function(name, notMe) {
816
var addMe = !(notMe), ckey = (addMe) ? PROV : SUPER,
817
m = this.getModule(name), o = {};
827
var s = m.supersedes, done={}, me = this;
829
// use worker to break cycles
830
var add = function(mm) {
833
// we always want the return value normal behavior
834
// (provides) for superseded modules.
835
Y.mix(o, me.getProvides(mm));
842
// calculate superseded modules
844
for (var i=0; i<s.length; i=i+1) {
852
m[PROV] = Y.merge(o);
853
m[PROV][name] = true;
861
* Calculates the dependency tree, the result is stored in the sorted
864
* @param o optional options object
866
calculate: function(o) {
867
if (o || this.dirty) {
871
if (this.allowRollup) {
883
* Investigates the current YUI configuration on the page. By default,
884
* modules already detected will not be loaded again unless a force
885
* option is encountered. Called by calculate()
891
var info = this.moduleInfo, name, i, j;
893
var l = Y.merge(this.inserted); // shallow clone
896
if (!this.ignoreRegistered) {
897
Y.mix(l, YUI.Env.mods);
901
// add the ignore list to the list of loaded packages
903
// OU.appendArray(l, this.ignore);
904
Y.mix(l, Y.Array.hash(this.ignore));
907
// expand the list to include superseded modules
909
if (l.hasOwnProperty(j)) {
910
Y.mix(l, this.getProvides(j));
914
// remove modules on the force list from the loaded list
916
for (i=0; i<this.force.length; i=i+1) {
917
if (this.force[i] in l) {
918
delete l[this.force[i]];
930
* Inspects the required modules list looking for additional
931
* dependencies. Expands the required list to include all
932
* required modules. Called by calculate()
936
_explode: function() {
938
var r=this.required, i, mod;
941
if (r.hasOwnProperty(i)) {
942
mod = this.getModule(i);
944
var req = this.getRequires(mod);
947
Y.mix(r, Y.Array.hash(req));
953
getModule: function(name) {
955
var m = this.moduleInfo[name];
957
// create the default module
959
// m = this.addModule({ext: false}, name);
966
* Look for rollup packages to determine if all of the modules a
967
* rollup supersedes are required. If so, include the rollup to
968
* help reduce the total number of connections required. Called
973
_rollup: function() {
974
var i, j, m, s, rollups={}, r=this.required, roll,
975
info = this.moduleInfo;
977
// find and cache rollup modules
978
if (this.dirty || !this.rollups) {
980
if (info.hasOwnProperty(i)) {
981
m = this.getModule(i);
982
// if (m && m.rollup && m.supersedes) {
989
this.rollups = rollups;
992
// make as many passes as needed to pick up rollup rollups
996
// go through the rollup candidates
999
// there can be only one
1000
if (!r[i] && !this.loaded[i]) {
1001
m =this.getModule(i); s = m.supersedes ||[]; roll=false;
1009
// check the threshold
1010
for (j=0;j<s.length;j=j+1) {
1012
// if the superseded module is loaded, we can't load the rollup
1013
// if (this.loaded[s[j]] && (!_Y.dupsAllowed[s[j]])) {
1014
if (this.loaded[s[j]]) {
1017
// increment the counter if this module is required. if we are
1018
// beyond the rollup threshold, we will use the rollup module
1019
} else if (r[s[j]]) {
1021
roll = (c >= m.rollup);
1033
// expand the rollup's dependencies
1034
this.getRequires(m);
1039
// if we made it here w/o rolling up something, we are done
1047
* Remove superceded modules and loaded modules. Called by
1048
* calculate() after we have the mega list of all dependencies
1052
_reduce: function() {
1054
var i, j, s, m, r=this.required;
1057
// remove if already loaded
1058
if (i in this.loaded) {
1061
// remove anything this module supersedes
1064
m = this.getModule(i);
1065
s = m && m.supersedes;
1067
for (j=0; j<s.length; j=j+1) {
1077
_attach: function() {
1079
// this is the full list of items the YUI needs attached,
1080
// which is needed if some dependencies are already on
1081
// the page without their dependencies.
1082
if (this.attaching) {
1083
Y._attach(this.attaching);
1085
Y._attach(this.sorted);
1092
_onSuccess: function() {
1096
for (var i in this.skipped) {
1097
delete this.inserted[i];
1102
// this.fire('success', {
1106
var f = this.onSuccess;
1108
f.call(this.context, {
1117
_onFailure: function(msg) {
1119
// this.fire('failure', {
1120
// msg: 'operation failed: ' + msg,
1124
var f = this.onFailure;
1126
f.call(this.context, {
1127
msg: 'failure: ' + msg,
1134
_onTimeout: function() {
1137
// this.fire('timeout', {
1141
var f = this.onTimeout;
1143
f.call(this.context, {
1152
* Sorts the dependency tree. The last step of calculate()
1157
// create an indexed list
1158
var s=Y.Object.keys(this.required), info=this.moduleInfo, loaded=this.loaded,
1161
// returns true if b is not loaded, and is required
1162
// directly or by means of modules it supersedes.
1163
var requires = function(aa, bb) {
1167
if (loaded[bb] || !mm) {
1171
var ii, rr = mm.expanded,
1172
after = mm.after, other=info[bb];
1174
// check if this module requires the other directly
1175
if (rr && Y.Array.indexOf(rr, bb) > -1) {
1179
// check if this module should be sorted after the other
1180
if (after && Y.Array.indexOf(after, bb) > -1) {
1184
// check if this module requires one the other supersedes
1185
var ss=info[bb] && info[bb].supersedes;
1187
for (ii=0; ii<ss.length; ii=ii+1) {
1188
if (requires(aa, ss[ii])) {
1194
// external css files should be sorted below yui css
1195
if (mm.ext && mm.type == CSS && (!other.ext)) {
1202
// pointer to the first unsorted item
1205
// keep going until we make a pass without moving anything
1208
var l=s.length, a, b, j, k, moved=false;
1210
// start the loop after items that are already sorted
1211
for (j=p; j<l; j=j+1) {
1213
// check the next module on the list to see if its
1214
// dependencies have been met
1217
// check everything below current item and move if we
1218
// find a requirement for the current item
1219
for (k=j+1; k<l; k=k+1) {
1220
if (requires(a, s[k])) {
1222
// extract the dependency so we can move it up
1225
// insert the dependency above the item that
1227
s.splice(j, 0, b[0]);
1234
// jump out of loop if we moved something
1237
// this item is sorted, move our pointer and keep going
1243
// when we make it here and moved is false, we are
1255
* inserts the requested modules and their dependencies.
1256
* <code>type</code> can be "js" or "css". Both script and
1257
* css are inserted if type is not provided.
1259
* @param o optional options object
1260
* @param type {string} the type of dependency to insert
1262
insert: function(o, type) {
1265
// build the dependency list
1270
this._internalCallback = function() {
1271
self._internalCallback = null;
1272
self.insert(null, JS);
1274
this.insert(null, CSS);
1278
// set a flag to indicate the load has started
1279
this._loading = true;
1281
// flag to indicate we are done with the combo service
1282
// and any additional files will need to be loaded
1284
this._combineComplete = false;
1286
// keep the loadType (js, css or undefined) cached
1287
this.loadType = type;
1295
* Executed every time a module is loaded, and if we are in a load
1296
* cycle, we attempt to load the next script. Public so that it
1297
* is possible to call this if using a method other than
1298
* Y.register to determine when scripts are fully loaded
1300
* @param mname {string} optional the name of the module that has
1301
* been loaded (which is usually why it is time to load the next
1304
loadNext: function(mname) {
1306
// It is possible that this function is executed due to something
1307
// else one the page loading a YUI module. Only react when we
1308
// are actively loading something
1309
if (!this._loading) {
1313
var s, len, i, m, url, self=this;
1315
// @TODO this will need to handle the two phase insert when
1316
// CSS support is added
1317
if (this.loadType !== CSS && this.combine && (!this._combineComplete)) {
1319
this._combining = [];
1324
for (i=0; i<len; i=i+1) {
1325
m = this.getModule(s[i]);
1326
// @TODO we can't combine CSS yet until we deliver files with absolute paths to the assets
1327
// Do not try to combine non-yui JS
1328
if (m.type == JS && !m.ext) {
1329
url += this.root + m.path;
1334
this._combining.push(s[i]);
1338
if (this._combining.length) {
1341
var callback=function(o) {
1342
this._combineComplete = true;
1345
var c=this._combining, len=c.length, i, m;
1346
for (i=0; i<len; i=i+1) {
1347
this.inserted[c[i]] = true;
1350
this.loadNext(o.data);
1353
// @TODO get rid of the redundant Get code
1355
data: this._loading,
1356
onSuccess: callback,
1357
onFailure: this._onFailure,
1358
onTimeout: this._onTimeout,
1359
insertBefore: this.insertBefore,
1360
charset: this.charset,
1361
timeout: this.timeout,
1368
this._combineComplete = true;
1374
// if the module that was just loaded isn't what we were expecting,
1376
if (mname !== this._loading) {
1381
// The global handler that is called when each module is loaded
1382
// will pass that module name to this function. Storing this
1383
// data to avoid loading the same module multiple times
1384
this.inserted[mname] = true;
1386
// this.fire('progress', {
1390
if (this.onProgress) {
1391
this.onProgress.call(this.context, {
1403
for (i=0; i<len; i=i+1) {
1405
// this.inserted keeps track of what the loader has loaded.
1406
// move on if this item is done.
1407
if (s[i] in this.inserted) {
1411
// Because rollups will cause multiple load notifications
1412
// from Y, loadNext may be called multiple times for
1413
// the same module when loading a rollup. We can safely
1414
// skip the subsequent requests
1415
if (s[i] === this._loading) {
1419
// log("inserting " + s[i]);
1420
m = this.getModule(s[i]);
1424
var msg = "Undefined module " + s[i] + " skipped";
1425
this.inserted[s[i]] = true;
1426
this.skipped[s[i]] = true;
1429
// this.fire('failure', {
1436
// The load type is stored to offer the possibility to load
1437
// the css separately from the script.
1438
if (!this.loadType || this.loadType === m.type) {
1439
this._loading = s[i];
1441
var fn=(m.type === CSS) ? Y.Get.css : Y.Get.script,
1442
onsuccess=function(o) {
1443
self.loadNext(o.data);
1446
url=m.fullpath || this._url(m.path, s[i]);
1451
onSuccess: onsuccess,
1452
insertBefore: this.insertBefore,
1453
charset: this.charset,
1454
onFailure: this._onFailure,
1455
onTimeout: this._onTimeout,
1456
timeout: this.timeout,
1465
this._loading = null;
1467
// internal callback for loading css first
1468
if (this._internalCallback) {
1470
var f = this._internalCallback;
1471
this._internalCallback = null;
1474
// } else if (this.onSuccess) {
1477
// call Y.use passing this instance. Y will use the sorted
1487
* In IE, the onAvailable/onDOMReady events need help when Event is
1488
* loaded dynamically
1489
* @method _pushEvents
1490
* @param {Function} optional function reference
1493
_pushEvents: function() {
1500
* Generates the full url for a module
1502
* @param path {string} the path fragment
1503
* @return {string} the full url
1506
_url: function(path, name) {
1508
var u = (this.base || "") + path,
1512
var useFilter = true;
1514
if (this.filterName == "DEBUG") {
1517
exc = self.logExclude,
1518
inc = self.logInclude;
1519
if (inc && !(name in inc)) {
1521
} else if (exc && (name in exc)) {
1528
u = u.replace(new RegExp(f.searchExp), f.replaceStr);
1538
// Y.augment(Y.Loader, Y.Event.Target);