- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 15 May 2012 11:56:45 -0400
- To: public-web-perf@w3.org
On 5/15/12 11:30 AM, Sreeram Ramachandran wrote: > Do we need to clarify in the spec that the event fires between load > and pageshow There would be no visibility change event during an initial page load, if it happened in a foreground tab, since the page starts out visible and there is no visibility change. If we wanted to fire a visibility change event at all during initial pageload, it would need to fire a _lot_ earlier than load/pageshow. Probably somewhere around when layout actually starts. The firing before pageshow I was talking about is for the case when pageshow is being fired when a page comes out of the back/forward cache. In that situation there is no load event, so no need to define ordering of the visibility change event and the load event. > (i.e., add a similar hook to > http://dev.w3.org/html5/spec/single-page.html#the-end) and that it > only fires if the visibility state has changed from the document's > initial visibility state? If the document's visibility state changes from the initial one during pageload, this would hit the normal "queue a task to fire a visibility change event" codepath, I would think. -Boris
Received on Tuesday, 15 May 2012 15:57:18 UTC