[whatwg] events when navigating away before page load?

Mike Wilson mikewse at hotmail.com
Fri Dec 14 09:07:11 PST 2012

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?

Trying the below script:
(also on http://jsfiddle.net/Skt22/)
      function(){console.log("domload");}, false);

      function(){console.log("load");}, false);

      function(){console.log("unload");}, false);

    window.location = "about:blank";

gives the following result in a couple of browsers:

          FF17  Chr23 IE9
          ----- ----- -----
domload   y     y     n
load      n     n     n
unload​   y     y     n

Could someone help me out on what behaviour is spec compliant
here? (I've been reading
but this stuff is quite complex)

Mike Wilson

More information about the whatwg mailing list