background-timer
DEPRECATED: Use silent-audio instead.
Allows timeouts, intervals and animations to continue in background tabs.
Timers will use regular methods when the tab is focused, and rely on timers within a small popup window when out of focus.
Why?
Chrome and Firefox throttle timers in background tabs to prevent abuse of resources. Unfortunately, well-behaving apps are sometimes broken by this policy. This provides a workaround, while still allowing the user to "opt-out" by closing the popup window.
Install
NPM:
npm install --save background-timer
const BackgroundTimer =
Script:
windowBackgroundTimer
Examples
element window window window window window window
element backgroundTimer backgroundTimer backgroundTimer backgroundTimer backgroundTimer backgroundTimer