News for hackers. Stuff that matters.
Re:JavaScript ‘wake’ event by edwinvdgraaf on Thursday August 01, 2013 @11:09AM (#6140801)
RequestAnimationFrame[1] would solve that, however it wouldn't trigger in the background, which may, or may not be wanted.

[1]: http://www.paulirish.com/2011/requestanimationframe-for-smar...

Re:JavaScript ‘wake’ event by masklinn on Thursday August 01, 2013 @11:33AM (#6140978)
Probably is actually, I'd expect there's little need to update the list if said list is not being looked at. On the other hand, it might be fairly costly while the system is being watched as it will fire (and do some check) on every single frame.
Re:JavaScript ‘wake’ event by tantalor on Thursday August 01, 2013 @12:42PM (#6141547)
requestAnimationFrame may be too frequent in the foreground (could effect performance?), and not necessarily 0 in the background.

That repaint may occur up to 60 times per second for foreground tabs (the exact rate is up to the browser to decide), but may be reduced to a lower rate in background tabs.

https://developer.mozilla.org/en-US/docs/Web/API/window.requ...