I'm using chrome, I think the javascript engine is slowing down because it doesn't detect enough user interaction/"load"? Obviously, I'm not a fulltime web/browser developer. Hit F12, open the console, and paste in that javascript, and it will continuously run at the elevated speed, as long as it's the active tab in the current window. Break the tab out into its own window, and it will run in the background at full speed. The snippet is making a trivial call on one of the elements 50x per second, like a very gentle busy loop.
On a really basic MNIST model, 784->32dense->10dense, batch size 100, I'm getting about 2 batches per second idle, and 20 batches per second after running the above snippet.
To anyone who actually knows anything about web dev, please correct me with a proper explanation.