Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
cleanup visibilityState conditions
Browse files Browse the repository at this point in the history
1) added unload case (report hidden)
2) consistent use of 'doc'
  • Loading branch information
igrigorik committed Nov 12, 2015
1 parent 7f321f2 commit cd72018
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,17 @@ <h3>
<li>Otherwise, return the <a>VisibilityState</a> value that best
matches the <a>visibility state</a> of <var>doc</var>:</li>
<ol>
<li>If the document was <a href="https://w3c.github.io/resource-hints/#prerender">prerendered</a> and has not previously transitioned to "visible", return "prerender".</li>
<li>If <var>doc</var> was <a href="https://w3c.github.io/resource-hints/#prerender">prerendered</a> and has not previously transitioned to "visible", return "prerender".</li>
<li>Return "visible" if:</li>
<ol>
<li>The user agent is not minimized and the page is on a foreground tab.</li>
<li>The user agent is fully obscured by an accessibility tool, like a magnifier, but a view of the page is shown.</li>
<li>The user agent is not minimized and <var>doc</var> is the foreground tab.</li>
<li>The user agent is fully obscured by an accessibility tool, like a magnifier, but a view of the <var>doc</var> is shown.</li>
</ol>
<li>Return "hidden" if:</li>
<ol>
<li>The user agent is minimized.</li>
<li>The user agent is not minimized, but the page is on a background tab.</li>
<li>The user agent is not minimized, but <var>doc</var> is on a background tab.</li>
<li>The user agent is to <a>unload</a> <var>doc</var>.</li>
<li>The Operating System lock screen is shown.</li>
</ol>
</ol>
Expand Down

0 comments on commit cd72018

Please sign in to comment.