Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
crandles
· 13y ago · 0 comments
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...
Comments
[–]
lewispollard
13y ago
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