Update toolkit.js

This commit is contained in:
Namhyeon Go 2022-02-28 17:50:54 +09:00 committed by GitHub
parent c057c86086
commit ec0873e0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,20 +21,18 @@ var ToolkitObject = function() {
this.create(); this.create();
}; };
var Toolkit = new ToolkitObject();
exports.create = function() { exports.create = function() {
return new ToolkitObject(); return new ToolkitObject();
}; };
exports.getInterface = function() { exports.getInterface = function() {
return Toolkit.getInterface(); return exports.create().getInterface();
}; };
exports.sendClick = function(wName, x, y, retry) { exports.sendClick = function(wName, x, y, retry) {
var i = 0; var i = 0;
while (i < retry) { while (i < retry) {
Toolkit.getInterface().SendClick(wName, x, y); exports.getInterface().SendClick(wName, x, y);
i++; i++;
} }
}; };