My understanding is that Javascript timers are paused when there is an alert dialog open. I see this behavior in Chrome, Safari, and IE. However, in Firefox it appears that the timers are not paused. Instead, they continue to count down and then when you come out of the alert() dialogue the function executes right away.
Is this expected behavior in Firefox? Is there an ECMA standard for how to deal with timers when there is user intervention? Most importantly, is there a way to standardize this across browsers?
Example JSFiddle to try running in different browsers: http://jsfiddle.net/DuncanMack/p1h5769b/
setTimeout(function() {
alert("There should be a two second pause before I come up after you close the previous window");
},2000);
alert("Will I stop event timers? It appears to depend on the browser. Hang out in this window for a while and then see if the next alert dialog comes right up or if you have two wait 2 seconds");