Hacker News new | ask | show | jobs
by crandles 4596 days ago
I believe window.requestAnimationFrame is preferred over setInterval, and doesn't get limited as such.

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

1 comments

Actually requestAnimationFrame is limited more (possibly even entirely paused) as it assumes that if the tab isn't visible, no animation needs to be requested