Skip to content

Instantly share code, notes, and snippets.

@djg
Created February 18, 2016 01:29
Show Gist options
  • Save djg/05323539d0894dd9119c to your computer and use it in GitHub Desktop.
Save djg/05323539d0894dd9119c to your computer and use it in GitHub Desktop.
nsDocument: IsActive() vs. IsVisible() vs. Hidden()
<roc> basically, IsActive() is true when the document is associated with a GlobalWindow(inner) which is the current document in its docshell
<roc> i.e. not bfcached
<roc> IsVisible() is similar but more specifically delimited by the pageshow and pagehide DOM events
<roc> Hidden() is like !IsActive() but all documents associated with hidden tabs are also Hdden()
<roc> tabs/docshells have this "hidden" state; all Firefox tabs that aren't the topmost tab are marked hidden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment