- From: James Graham <jgraham@opera.com>
- Date: Mon, 16 Apr 2012 18:25:44 +0200
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: public-web-perf@w3.org
On 04/03/2012 05:27 PM, Boris Zbarsky wrote: > On 4/3/12 10:57 AM, James Graham wrote: >> "On getting, the hidden 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. The attribute MUST return >> false if the Document contained by the top level browsing context is at >> least partially visible on at least one screen." >> >> Is the reference to top level browsing context here really what's >> wanted? For example if one document opens a page using window.open > > Then at that point there are two top level browsing contexts. > > "top level" just goes up the .parent chain; it doesn't go across .opener. Oh, you are right of course. >> In general I wonder if it wouldn't be better to fire visibilitychange >> events at all documents in the unit of related browsing context. > > I'm not sure what you mean... > >> This would make it easier for authors to get up-to-date visibility >> information rather than relying on them hooking into the >> visibilitychange event for the top level browsing context. > > visibilitychange events are fired on all documents whose visibility > changes. So if you have a browser window containing a page and that page > has a subframe and the user minimizes the window, you should get one > visibilitychange event in the page and one in the subframe. In that case I totally misunderstood the spec on this point. Am I missing something obvious?
Received on Monday, 16 April 2012 16:26:16 UTC