2 ms·
This seems like a good idea because APIs already exist to detect whether a page has been backgrounded, so it should be simple enough for a JS app to cease creat
by ravenstine 6y ago
This seems like a good idea because APIs already exist to detect whether a page has been backgrounded, so it should be simple enough for a JS app to cease creating timers when they aren't necessary. (Since I'm guessing a lot of timers get created for the purposes of visual reactivity)
https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API?redirectlocale=en-US&redirectslug=DOM%2FUsing_the_Page_Visibility_API https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibi...
I wonder if this would effect Web Workers in the same way.