Questions tagged [visibilitychange]

The visibilitychange event is fired when the content of a tab has become visible or has been hidden.

27 questions
10
votes
2 answers

Document visibilitychange versus window blur/focus, what is the difference, when to use which?

In ECMAscript (=Javascript) there are two ways to check if the user is away from your page or not. You can either listen for a "visibilitychange" event on the document or you can listen for "blur" and "focus" events on the window. Is there a…
HolyResistance
  • 594
  • 1
  • 8
  • 26
7
votes
1 answer

Visibility API is not working after window.open in Chrome

I was trying to use Visibility API, but it is not working for a child. The minimal example to reproduce: