[英]Is javascript timer events run in bulk when logging in after screen lock?
I know that timer events will be throttled to execute once in a second when browser tab is not active, likewise is there any scenario timer events will be stored and executed in bulk at once? 我知道,当浏览器选项卡处于不活动状态时,计时器事件将被限制每秒执行一次,同样,是否存在任何场景计时器事件将被一次性存储并批量执行? (eg: when logging in a locked session)
(例如:登录锁定的会话时)
When you block the thread - all timers will get "clamped" in Opera 12.x (Presto) and Firefox: 当您阻塞线程时,Opera 12.x(Presto)和Firefox中的所有计时器都将被“固定”:
setTimeout( function () { var x = Date.now(); console.log(x) }, 1000);
setTimeout( function () { var x = Date.now(); console.log(x) }, 9000);
alert('Please wait at least 10 seconds, then press OK');
but will not clamp in IE or Chrome (and, probably, same behavior will be observed in Opera 14+ (Webkit/Blink) and Safari). 但不会限制 IE或Chrome(并且可能会在Opera 14+(Webkit / Blink)和Safari中观察到相同的行为)。
Compare: 相比:
Opera
1371598885051
1371598885051
Firefox
1371598994797
1371598994798
Chrome
1371599039369
1371599047371
IE10
1371598756046
1371598763050
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.