[whatwg] Navigation triggered from unload
jgraham at opera.com
Tue Jun 12 03:30:09 PDT 2012
What is the expected behaviour of navigation triggered from unload
handlers? In particular, what stops such navigations from re-triggering
the unload handler, and thus starting yet another navigation?
It looks like the spec tries to make a distinction between navigations
that are cross-origin and those that are not (step 4 in the "navigating
across documents" algorithm); I'm not sure why this inconsistency is
desirable rather than using the cross-origin approach always.
Based on some tests (-), it seems that WebKit seems to cancel the
navigation in the unload handler always, Opera seems to always carry out
the navigation in the unload handler, and Gecko seems to follow WebKit
in the cross-origin case and Opera in the same-origin case. In all cases
the unload handler is only called once.
More information about the whatwg