Re: [Page Visibility] Navigate away behavior (was RE: TPAC 2011 Web Performance WG 2011-11-01)

On 5/17/12 4:54 PM, Jatinder Mann wrote:
> Considering we have reached consensus on ISSUE-8: Determine whether to fire visibilitychange even unloading or suspending, http://www.w3.org/2010/webperf/track/issues/8, I have updated the Page Visibility spec to fire the visibilitychange event before the pageshow event, after the pagehide event and before the unload event.

Jatinder,

I'm not sure the changes are quite right.

In particular:

1) When traversing _from_ session history entries browsers fire a 
_pagehide_ event.  But your spec text talks about firing a _pageshow_ 
event.  There's a similar issue with the events being reversed in teh 
traversing _to_ session history entries case.

2) When unloading a document, why would a UA not end up in the " Else if 
the Document contained by the top level browsing context is now not 
visible" branch if the if/else cascade?  Seems like it would, as the 
spec is currently written...

3) The addition of pageshow/pagehide event firing in this spec would, if 
actually implemented, make those events fire twice.  That doesn't seem 
right.

4) The event firing for the "unloading document visibility change steps" 
should not be restricted to the unloading of top-level documents, imo: 
if a subframe document is unloaded its visibility should change to hidden.

-Boris

Received on Friday, 18 May 2012 00:26:28 UTC