W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] Navigation events generated during unload

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 12 Oct 2009 15:24:52 -0400
Message-ID: <4AD38284.40700@mit.edu>
On 10/12/09 1:55 AM, Ian Hickson wrote:
> Why is the form.submit() ignored? It's not ignored in, e.g.:
>
>     http://www.hixie.ch/tests/adhoc/html/navigation/unload/same-origin/004.html

But in this case the form action is same-origin with the load that's 
happening....

> Oops, that's a vestigial bit. The comment is non-normative (and wrong);
> the actual normative text makes javascript: async, only about:blank is
> sync. Fixed.

Ah, ok. Thanks.

>> Also, I'm not quite sure what the part about unloading that comes after
>> the algorithm you pointed me to means.  Does it mean that once you get
>> the response and start parsing the new document you queue a task to
>> unload the old one?  That doesn't seem at all right to me, since at this
>> point the new document can be running scripts that touch the WindowProxy
>> they share...
>
> Not sure what you mean here. I've tried to clarify that the new page must
> be active before any scripts run.

Looking at the algorithm steps when I made my last comment, it sounded 
like the new data starts coming in, the UA starts processing it, and 
queues a task to unload the old document.  Gecko at the moment, for 
example, unloads the old document immediately after firing unload on it, 
and before parsing any of the new document.  Is that the behavior the 
spec calls for?

-Boris
Received on Monday, 12 October 2009 12:24:52 UTC

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