1318 |
alexandre_ |
1 |
/*
|
|
|
2 |
Copyright (c) 2004-2006, The Dojo Foundation
|
|
|
3 |
All Rights Reserved.
|
|
|
4 |
|
|
|
5 |
Licensed under the Academic Free License version 2.1 or above OR the
|
|
|
6 |
modified BSD license. For more information on Dojo licensing, see:
|
|
|
7 |
|
|
|
8 |
http://dojotoolkit.org/community/licensing.shtml
|
|
|
9 |
*/
|
|
|
10 |
|
1422 |
alexandre_ |
11 |
|
|
|
12 |
|
1318 |
alexandre_ |
13 |
dojo.provide("dojo.browser_debug_xd");
|
|
|
14 |
dojo.nonDebugProvide = dojo.provide;
|
|
|
15 |
dojo.provide = function (resourceName) {
|
|
|
16 |
var dbgQueue = dojo.hostenv["xdDebugQueue"];
|
|
|
17 |
if (dbgQueue && dbgQueue.length > 0 && resourceName == dbgQueue["currentResourceName"]) {
|
|
|
18 |
window.setTimeout("dojo.hostenv.xdDebugFileLoaded('" + resourceName + "')", 1);
|
|
|
19 |
}
|
|
|
20 |
dojo.nonDebugProvide.apply(dojo, arguments);
|
|
|
21 |
};
|
|
|
22 |
dojo.hostenv.xdDebugFileLoaded = function (resourceName) {
|
|
|
23 |
var dbgQueue = this.xdDebugQueue;
|
|
|
24 |
if (resourceName && resourceName == dbgQueue.currentResourceName) {
|
|
|
25 |
dbgQueue.shift();
|
|
|
26 |
}
|
|
|
27 |
if (dbgQueue.length == 0) {
|
|
|
28 |
dbgQueue.currentResourceName = null;
|
|
|
29 |
this.xdNotifyLoaded();
|
|
|
30 |
} else {
|
|
|
31 |
dbgQueue.currentResourceName = dbgQueue[0].resourceName;
|
|
|
32 |
var element = document.createElement("script");
|
|
|
33 |
element.type = "text/javascript";
|
|
|
34 |
element.src = dbgQueue[0].resourcePath;
|
|
|
35 |
document.getElementsByTagName("head")[0].appendChild(element);
|
|
|
36 |
}
|
|
|
37 |
};
|
|
|
38 |
|