Possible Duplicate:
Firefox setTimeout(func, ms) sending default parameters to callback
I have been wondering this for a long time. When I type in the following line in FF, then I get:
var timer = setTimeout(function () {console.log(arguments)}, 500);
arguments
outputs an array with a random number in it, and this number is different from the value of the timer
. When I try on Chrome, the arguments
is an empty array.
Anyone has noticed this?
From https://developer.mozilla.org/en/window.setTimeout:
Gecko passes an extra parameter to the callback routine, indicating the "lateness" of the timeout in milliseconds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With