Currently I am calling on regular times window.requestAnimationFrame (every 2 minutes), but when the page is inactive chrome stops its execution and when it becomes active again all the previous calls are released at once
I would like to not call window.requestAnimationFrame when the tab is inactive, but a different function.
How can I check if the window.requestAnimationFrame is available to be executed?
I have searched in stackoverflow but didn't found an answer.
Thank you for your responses