mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-16 06:31:04 +00:00
Update std.js
This commit is contained in:
parent
ca6f13196d
commit
3ff02c442e
|
@ -430,6 +430,15 @@ function AsyncFunction(f, __filename) {
|
||||||
this.runSynchronously = function() {
|
this.runSynchronously = function() {
|
||||||
return this.f.apply(null, arguments);
|
return this.f.apply(null, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (typeof this.__filename === "string") {
|
||||||
|
this.__filename = __filename;
|
||||||
|
} else if (typeof WScript !== "undefined") {
|
||||||
|
this.__filename = (function(path) {
|
||||||
|
var pos = Math.max.apply(null, [path.lastIndexOf("\\"), path.lastIndexOf("/")]);
|
||||||
|
return (pos > -1 ? path.substring(pos + 1) : "");
|
||||||
|
})(WScript.ScriptFullName);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
AsyncFunction.counter = 0;
|
AsyncFunction.counter = 0;
|
||||||
AsyncFunction.bind = function(exports, args) {
|
AsyncFunction.bind = function(exports, args) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user