Update std.js, webloader.js

This commit is contained in:
Namhyeon Go 2020-07-23 17:18:47 +09:00
parent 55980f7941
commit e0d476d891
2 changed files with 7 additions and 8 deletions

View File

@ -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
/////////////////////////////////////////////////////////////////////////////////

View File

@ -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) {