Not really.
There is no way to mimic or "polyfill" the arguments.caller
property, that has been removed for security reasons, so you can't climb up the scope chain, in-code.
The best alternative for arguments.callee
is to just to have named function expressions, instead of anonymous function expressions, like
setTimeout(function loop() {
if( /* condition */ ) {
loop(); // instead of arguments.callee();
}
}, 1000);
That is also faster in almost all implementations (accessing the arguments
objects is somewhat slow'ish in general)