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

[whatwg] Navigation events generated during unload

From: Adam Barth <whatwg@adambarth.com>
Date: Mon, 5 Oct 2009 17:58:26 -0700
Message-ID: <7789133a0910051758i3d025313q3462e937c7c1e623@mail.gmail.com>
On Mon, Oct 5, 2009 at 6:01 PM, Ian Hickson <ian at hixie.ch> wrote:
> I tried poking around a bit, and I found that an unload event handler
> could call a parent frame and get it to set .src on another <iframe> to
> cause navigation, but it couldn't post a form to that frame itself.
> It's not clear to me what the difference is. I can kill the navigation
> algorithm altogether while an 'unload' (or 'beforeunload') is running, but
> that would kill the case above of setting 'src' (which seems harmless
> enough that it should be allowed). I don't really know what else to do
> though. There's a variety of ways to trigger navigation.

Setting the src of another frame seems fine.

> Any suggestions? What do browsers actually do, white-box wise?

We ended up just stopping all navigation events on the frame whose
unload handler is firing.  That seemed to be what other browsers did.

Sounds like we don't need to change the spec.

Received on Monday, 5 October 2009 17:58:26 UTC

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