-
Notifications
You must be signed in to change notification settings - Fork 49
/
jpack_end.js
38 lines (32 loc) · 1.02 KB
/
jpack_end.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// #ifndef __SUPPORT_GWT
//Conditional compilation workaround... (can this be improved??)
if (document.all) {
var oldWinError = window.onerror, z;
window.onerror = z = function(m){
apf.console.error("Error caught from early startup. Might be a html parser syntax error (not your fault). " + m);
if (!arguments.caller)
return true;
}
}
apf.Init.addConditional(function(){
if (document.all && window.onerror == z) //Conditional compilation workaround... (can this be improved??)
window.onerror = oldWinError;
apf.dispatchEvent("domready");
}, null, ["body", "class"]);
/*if(document.body)
apf.Init.run("body");
else*/
apf.addDomLoadEvent(function(){apf.Init.run('body');});
//Start
if (window.require && typeof require.def == "function") {
require([
"apf/elements/codeeditor",
"apf/elements/debugger",
"apf/elements/debughost"
], function() {
apf.start()
});
}
else
apf.start();
// #endif