It's not really possible. Modern browsers like Firefox and Chrome effectively pause hidden tabs anyway, or reduce them to one frame per second (which is such a low framerate the runtime will switch itself in to paused mode anyway). This is important to ensure hidden tabs are not draining CPU or wasting battery life on mobile devices. Also many users desire automatic pausing because they don't want the game to carry on while they can't see it.