由于arguments.callee将被弃用,在下面的表达式中,我将使用什么来代替arguments.callee`:
var self = this;
this.async(function(){
if(test()){
then();
}else{
self.async(arguments.callee);
}
});发布于 2012-11-24 22:57:11
这应该是可行的。但我不确定它是否在所有浏览器中都有效。
var self = this;
this.async(function someMethod(){
if(test()){
then();
}else{
self.async(someMethod);
}
});https://stackoverflow.com/questions/13542283
复制相似问题