title: Is there any way to make javascript setTimeout pause when I switch to another tab?
body: <p>I am having some task that is executing, and when it finishes I show an animation and redirect the user to another page. I am using setTimeout method when redirecting to another page to wait for the whole animation to finish. However, if the user goes to another tab and the event that triggers the animation and redirection fires the user goes back to tab, but doesn't see the animation. Is there any way to tell the setTimeout method to wait until that tab is in active again?</p>