Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
 
11
dojo.provide("dojo.browser_debug_xd");
12
dojo.nonDebugProvide = dojo.provide;
13
dojo.provide = function (resourceName) {
14
	var dbgQueue = dojo.hostenv["xdDebugQueue"];
15
	if (dbgQueue && dbgQueue.length > 0 && resourceName == dbgQueue["currentResourceName"]) {
16
		window.setTimeout("dojo.hostenv.xdDebugFileLoaded('" + resourceName + "')", 1);
17
	}
18
	dojo.nonDebugProvide.apply(dojo, arguments);
19
};
20
dojo.hostenv.xdDebugFileLoaded = function (resourceName) {
21
	var dbgQueue = this.xdDebugQueue;
22
	if (resourceName && resourceName == dbgQueue.currentResourceName) {
23
		dbgQueue.shift();
24
	}
25
	if (dbgQueue.length == 0) {
26
		dbgQueue.currentResourceName = null;
27
		this.xdNotifyLoaded();
28
	} else {
29
		dbgQueue.currentResourceName = dbgQueue[0].resourceName;
30
		var element = document.createElement("script");
31
		element.type = "text/javascript";
32
		element.src = dbgQueue[0].resourcePath;
33
		document.getElementsByTagName("head")[0].appendChild(element);
34
	}
35
};
36