mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Update std.js
This commit is contained in:
parent
388c0ae3d0
commit
a0f2d645e5
20
lib/std.js
20
lib/std.js
|
@ -398,9 +398,22 @@ StdEventTarget.__counter__ = 0;
|
|||
|
||||
/*
|
||||
var a = new AsyncFunction(function() {
|
||||
console.log("calling");
|
||||
console.log("calling A");
|
||||
});
|
||||
|
||||
var _async_b = function(function() {
|
||||
console.log("calling B");
|
||||
});
|
||||
|
||||
function main(args) {
|
||||
AsyncFunction.bind(this, args);
|
||||
console.log("welcome");
|
||||
}
|
||||
|
||||
exports.a = a;
|
||||
exports._async_b = _async_b;
|
||||
*/
|
||||
|
||||
function AsyncFunction(f, __filename) {
|
||||
this.f = f;
|
||||
this.__filename = __filename;
|
||||
|
@ -445,14 +458,13 @@ AsyncFunction.bind = function(exports, args) {
|
|||
exports[target](args);
|
||||
result = true;
|
||||
} catch (e) {
|
||||
console.error("Exception of AsyncFunction.bind", e.message);
|
||||
result = false;
|
||||
console.error("Exception of", target, e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
throw new ReferenceError("AsyncFunction completed");
|
||||
};
|
||||
|
||||
function GeneratorFunction(f, callback) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user