[whatwg] Navigation events generated during unload

On Mon, 21 Sep 2009, Adam Barth wrote:
>
> I looked around in the HTML5 draft, but it wasn't obvious to me if it 
> explains how to handle navigation events generated during the unload 
> event.  As far as I can tell by testing browsers, these navigation 
> events are ignored.

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.

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

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 5 October 2009 18:01:06 UTC