这可能是愚蠢的,但我有这样的代码:
var f = functionWrapper();
f.apply(this, []);
function functionWrapper() {
return new function () {
console.log("Called function");
}
}
为什么它会崩溃并给出以下错误:
Uncaught TypeError: Object [object Object] has no method 'apply' test.html:28(anonymous function)