Electron setTimeout in inactive windows


Hi everyone,

I’m currently working on a project that requires extensive animations, using a canvas on the frontend. Currently, this is occuring through the requestAnimationFrame polyfill, which uses setTimeout.

In normal browsers however, setTimeout is throttled in inactive/currently unselected windows to one second (Chrome + Firefox). Is there any chance that the atom-shell has removed this restriction in its chromium build, or reduced it to something more managable?

The reason I’m asking is because I’m hoping that Electron has removed this restriction, allowing me to keep my current code, and allowing me to avoid using web workers and other convoluted solutions.



Electron supports requestAnimationFrame by itself, you shouldn’t need a polyfill. Or am I missing something?