I have a setInterval
running a piece of code 30 times a second. This works great, however when I select another tab (so that the tab with my code becomes inacti
There is a solution to use Web Workers (as mentioned before), because they run in separate process and are not slowed down
I've written a tiny script that can be used without changes to your code - it simply overrides functions setTimeout, clearTimeout, setInterval, clearInterval.
Just include it before all your code.
more info here