Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Ian Hickson
On Fri, 14 Dec 2012, Mike Wilson wrote: What events are supposed to be fired when the browsing context gets navigated away before the current page has finished loading, ie before the load event has been fired? It's pretty complicated, but the short answer is beforeunload and unload.

Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Mike Wilson
Thanks Ian, Ian Hickson wrote on 14 december 2012 19:22: On Fri, 14 Dec 2012, Mike Wilson wrote: What events are supposed to be fired when the browsing context gets navigated away before the current page has finished loading, ie before the load event has been fired? It's pretty

Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Ian Hickson
On Fri, 14 Dec 2012, Mike Wilson wrote: Anyway, the finding that originally got me started on looking at this was that I received an unload event without a preceeding load event. Naively this seems logically wrong, but I appreciate these are complicated matters so I'm content with the

Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Mike Wilson
Ian Hickson wrote on 14 december 2012 21:11: As a general rule, the intent of the spec is that you get a load when all your scripts (and other resources) have loaded, and you get an unload when the page is going away. Thus if the page goes away before the page has finished loading, you

Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Olli Pettay
There are also pageshow and pagehide events, although the spec for them seems to be wrong. They are fired always, not only when dealing with session history. -Olli On 12/14/2012 08:51 PM, Mike Wilson wrote: Thanks Ian, Ian Hickson wrote on 14 december 2012 19:22: On Fri, 14 Dec 2012, Mike

Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Ian Hickson
On Sat, 15 Dec 2012, Olli Pettay wrote: There are also pageshow and pagehide events, although the spec for them seems to be wrong. They are fired always, not only when dealing with session history. Do you have a test case that shows when they are fired in a way that doesn't match the spec?

Re: [whatwg] events when navigating away before page load?

2012-12-14 Thread Olli Pettay
On 12/15/2012 01:52 AM, Ian Hickson wrote: On Sat, 15 Dec 2012, Olli Pettay wrote: There are also pageshow and pagehide events, although the spec for them seems to be wrong. They are fired always, not only when dealing with session history. Do you have a test case that shows when they are