RE: making page visibility a property of document instead of top level browsing context

I'm not sure if this added complexity is necessary. Seems like the most useful information to an iframe is whether or not it is visible to the user, something we are already answering. I'm not sure if additional hidden states (e.g., monitor off, offscreen, inactive desktop) will be used to do something different from just the hidden state.

Also, something like "offscreen" can already be determined by a same origin iframe by checking if top.document.hidden == false and document.hidden == true.

It's also worth noting that if we provide "offscreen", then cross-origin iframes will get higher fidelity data on whether the iframe is above or below the fold. With Page Visibility L1, the cross origin iframe only knew that the top level document was visible. I don't think we want to increase the level of data shared with cross origin iframes.

Jatinder

From: Jake Archibald [mailto:jakearchibald@google.com]
Sent: Thursday, October 10, 2013 11:49 PM
To: Arvind Jain
Cc: public-web-perf; Jatinder Mann; Ojan Vafai; Jonas Sicking
Subject: Re: making page visibility a property of document instead of top level browsing context


On 11 Oct 2013 00:27, "Arvind Jain" <arvind@google.com<mailto:arvind@google.com>> wrote:
> One question I have is whether we define more values for "visibilityState" to cover different cases like the following:
> 1) Browser window minimized.
> 2) Background tab.
> 3) IFrame outside of viewport.
> 4) One of document's ancestor is set to display:none

There's also "window entirely obscured", "on inactive desktop", "monitor off".

I'm worried about the complexity here, is there a need for visibility to be more than a boolean? Will all states that != "visible" continue to mean no visibility or will code like that bite me later?

Received on Tuesday, 22 October 2013 23:14:57 UTC