3 ms·
Regarding the multiple tab issue, you can use the Page Visibility API [1] to determine if the page is still visible before firing the timeout event. It's a pret
by eclipticplane 13y ago
Regarding the multiple tab issue, you can use the Page Visibility API [1] to determine if the page is still visible before firing the timeout event. It's a pretty handy API for other things, too.
[1] https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API https://developer.mozilla.org/en-US/docs/Web/Guide/User_expe...