[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 Wednesday, 3 August 2011 17:57:59 UTC