W3C home > Mailing lists > Public > public-web-perf@w3.org > September 2011

[PageVisibility] What should the visibility api return in display:none iframes?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 28 Sep 2011 22:05:43 -0400
Message-ID: <4E83D277.3050402@mit.edu>
To: public-web-perf@w3.org
At the moment, the spec says to return the visibility state of the 
toplevel browsing context containing the iframe, as far as I can tell. 
Why is that desirable?

In particular, given an iframe script can always get the visibility 
state of the toplevel browsing context simply by doing 
top.document.visibilityState.  So having document.visibilityState simply 
mirror that saves about 4 characters of typing.  On the other hand, 
there may well be good use cases for detecting the visibility state of 
display:none iframes, right?

-Boris
Received on Thursday, 29 September 2011 02:06:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:31 UTC