Arguments.callee alternative

Since arguments.callee will be deprecated, what would I use instead of arguments.callee` in the following expression:

 var self = this; this.async(function(){ if(test()){ then(); }else{ self.async(arguments.callee); } }); 
+6
source share
1 answer

That 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); } }); 
+4
source

All Articles