3 ms·
I haven't looked at the source code but according to https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API https://developer.mozilla.org/en
by elisee 14y ago
I haven't looked at the source code but according to https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_..., you can simply register a onblur / onfocus event handler on the window object (this doesn't use the recent Page Visibility API, it's been possible for a long time)