W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 14 Dec 2012 18:22:29 +0000 (UTC)
To: Mike Wilson <mikewse@hotmail.com>
Message-ID: <Pine.LNX.4.64.1212141817570.12469@ps20323.dreamhostps.com>
Cc: whatwg@whatwg.org
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". "DOMContentLoaded" and "load" don't fire per spec, though this 
is controversial (it's been suggested that the abort that happens during 
navigation should be equivalent to the abort that happens when the user 
hits "Stop"; whether it is or not changes whether or not we pretend that 
the page finished parsing or not).

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 14 December 2012 18:22:55 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:50 UTC