[PageVisibility] comments

Frederick,

Thank you for your feedback.

The Working Group felt that the Page Visibility spec should only require the two basic states, PAGE_HIDDEN and PAGE_VISIBLE, and all additional states should be considered optional. We chose this design because some states may not make sense on all user agents or operating systems. For example, on Windows 7, the Taskbar preview is not dynamic when IE is minimized - PAGE_PREVIEW would never be useful to a developer. Likewise, other phone operating systems may or may not chose to give a dynamic preview - e.g., WebOS has interactive previews in its card model and may want to define this state. By keeping it optional, user agents will only return the PAGE_PREVIEW value when querying visibilityState if a preview state makes sense.

I will update the spec to capitalize "must" where appropriate.

Thanks,
Jatinder Mann

From: public-web-perf-request@w3.org<mailto:public-web-perf-request@w3.org> [mailto:public-web-perf-request@w3.org]<mailto:[mailto:public-web-perf-request@w3.org]> On Behalf Of Frederick.Hirsch@nokia.com<mailto:Frederick.Hirsch@nokia.com>
Sent: Wednesday, August 03, 2011 10:57 AM
To: public-web-perf@w3.org<mailto:public-web-perf@w3.org>
Cc: Frederick.Hirsch@nokia.com<mailto:Frederick.Hirsch@nokia.com>
Subject: [PageVisibility] comments

A few comments on the Page Visibility draft of 21 July, http://www.w3.org/TR/2011/WD-page-visibility-20110721/

(1) Is it correct that document.PAGE_HIDDEN and document.PAGE_VISIBLE must be supported, but document.PAGE_PREVIEW is optional? Why isn't it also required?

(2) General comment - use MUST where appropriate, in upper case

section 4.2
hidden attribute
change "returns" to "MUST return" in two places.:

This attribute MUST return  true if the Document contained by the top level browsing context (root window in the browser's viewport) is not visible at all. This attribute MUST return false if the Document contained by the top level browsing context is at least partially visible on at least one screen.
document.PAGE_HIDDEN
change "must" to "MUST"


This attribute MUST return document.PAGE_HIDDEN if the Document <http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document> contained by the top level browsing context<http://dev.w3.org/html5/spec/Overview.html#top-level-browsing-context> is not visible at all on any screen.

document.PAGE_VISIBLE
change "must" to "MUST"

This attribute MUST return document.PAGE_VISIBLE if the Document <http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document> contained by the top level browsing context<http://dev.w3.org/html5/spec/Overview.html#top-level-browsing-context> is at least partially visible at on at least one screen. This is the same condition under which the hidden attribute is set to false.
Section 4.3

change "is" to "MUST be"

The visibilitychange event MUST be fired any time a change is made to the document.visibilityState attribute

regards, Frederick

Frederick Hirsch
Nokia

Received on Thursday, 4 August 2011 18:15:24 UTC