Reputation: 28810
As arguments.callee
is going to be deprecated, what would I use of instead of arguments.callee` in the following expression:
var self = this;
this.async(function(){
if(test()){
then();
}else{
self.async(arguments.callee);
}
});
Upvotes: 7
Views: 1669
Reputation: 3951
This should work. But i'm not sure if it works in all browsers.
var self = this;
this.async(function someMethod(){
if(test()){
then();
}else{
self.async(someMethod);
}
});
Upvotes: 5