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.
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...