mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-11 16:35:13 +00:00
Update std.js, webloader.js
This commit is contained in:
parent
55980f7941
commit
e0d476d891
|
@ -64,14 +64,6 @@ global.sleep = function(ms, callback) {
|
|||
}
|
||||
}
|
||||
|
||||
global.exit = function() {
|
||||
if (typeof(WScript) !== "undefined") {
|
||||
WScript.Quit();
|
||||
} else if (typeof(window) !== "undefined") {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Private APIs / Utility functions
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -22,6 +22,13 @@ global.console.__echo = function(msg) {
|
|||
global.console.__messages.push(msg);
|
||||
};
|
||||
|
||||
// "override exit";
|
||||
global.exit = function() {
|
||||
if (typeof(window) !== "undefined") {
|
||||
window.close();
|
||||
}
|
||||
};
|
||||
|
||||
// "less than IE 9";
|
||||
window.enableEventListener = function(obj) {};
|
||||
if (!window.addEventListener) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user