I have a website which uses requestAnimationFrame to constantly run a couple of functions. However, it won't run when the tab is hidden. I found a script online from https://stackoverflow.com/a/31105348/16855745, but this only worked for setTimeout. I used the following: requestAnimationFrame=function(t){setTimeout(t,1000/60)}, which worked when paired with the above script, but I was wondering if there is any direct way to make requestAnimationFrame work when page is hidden.