Update app.js

This commit is contained in:
Namhyeon Go 2023-09-05 03:27:00 +09:00 committed by GitHub
parent db55b30106
commit 01f0ae6254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

16
app.js
View File

@ -172,17 +172,10 @@ var console = {
if (typeof CreateObject === "undefined") {
var CreateObject = function(progId, serverName, callback) {
var progIds = (progId instanceof Array ? progId : [progId]);
var _CreateObject = function(p, s) {
if (typeof WScript !== "undefined") {
return WScript.CreateObject(p, s);
} else {
return new ActiveXObject(p);
}
};
for (var i = 0; i < progIds.length; i++) {
try {
var obj = _CreateObject(progIds[i], serverName);
var obj = CreateObject.make(progIds[i], serverName);
if (typeof callback === "function") {
callback(obj, progIds[i]);
}
@ -192,6 +185,13 @@ if (typeof CreateObject === "undefined") {
};
}
};
CreateObject.make = function(p, s) {
if (typeof WScript !== "undefined") {
return WScript.CreateObject(p, s);
} else if (typeof ActiveXObject !== "undefined") {
return new ActiveXObject(p);
}
};
}
/**