3 ms·
I have many tabs open that I'm not actually "on." I just took a shower and left HN open, for example. Can it detect that the tab is "active" or "focus?" That
by dhimes 14y ago
I have many tabs open that I'm not actually "on." I just took a shower and left HN open, for example. Can it detect that the tab is "active" or "focus?" That may help. But I'm not sure this is a problem worth a ton of work. It's, at best, a proxy for measuring things like interest.
- shurcooL 14y agoYeah, as you say, even if it just tells if a tab is open (active or inactive), that's already a good measure of interest. But I think it may be possible to determine if the current tab is open with some javascript, and send that information through the websocket. Edit: what bsimpson said.
- bsimpson 14y agodocument.addEventListener('visibilitychange', onVisibilityChange);