121
rated 0 times
[
123]
[
2]
/ answers: 1 / hits: 24391
/ 13 Years ago, fri, december 2, 2011, 12:00:00
For doing things like
setTimeout(function () {
...
setTimeout(arguments.callee, 100);
}, 100);
I need something like arguments.callee
. I found information at javascript.info that arguments.callee
is deprecated:
This property is deprecated by ECMA-262 in favor of named function
expressions and for better performance.
But what should be then used instead? Something like this?
setTimeout(function myhandler() {
...
setTimeout(myhandler, 100);
}, 100);
// has a big advantage that myhandler cannot be seen here!!!
// so it doesn't spoil namespace
BTW, is arguments.callee
cross-browser compatible?
More From » cross-browser