Page Visibility API doesn't work as I expected

29 views
Skip to first unread message

macrojd

unread,
Nov 8, 2012, 3:40:21 AM11/8/12
to chromiu...@chromium.org
Hi guys. I was testing the Page Visibility API and discovered that visibilityState only changes when the user moves to another tab or the window is minimized, but stays in the visible state if the user moves to another window or program. To detect the real state of the document I had to use the focus and blur events. 
Is this the right behavior? Because is that's the case the API is just a complement of the blur and focus event and we have to use those events along with the API to detect visibility for real.

Thanks
JD

John Knottenbelt

unread,
Nov 8, 2012, 6:04:15 AM11/8/12
to macrojd, Chromium HTML5
Hi JD,

Can you check behaviour against http://www.w3.org/TR/page-visibility/#sec-document-interface ? There is states that hidden returns false if "The User Agent is not minimized and the page is on a foreground tab."

Cheers

John



--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-html5/-/O0ORtWHRjAQJ.
To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.

Reply all
Reply to author
Forward
0 new messages