W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: Proposal: Detecting when the user leaves a page due to hitting the back button or typing in a URL or going to a favorite

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 05 Jan 2009 11:27:20 -0500
Message-ID: <496234E8.3020001@mit.edu>
To: Giovanni Campagna <scampa.giovanni@gmail.com>
CC: public-webapps@w3.org

Giovanni Campagna wrote:
> Probably treating the onbeforeunload as a real cancelable event

But the key is that the page must not be able to prevent navigation away 
from itself without explicit OK by the user.  In other words, while the 
UA needs to be able to cancel the unload, the page has no need to.  That 
ability already exists with onbeforeunload.

> One may attach a onbeforeunload to a frame, and would like to know if 
> only its javascript context is going to
> disappear, instead of the whole tab being destroyed, so it can send 
> messages to parent window and have them read and handled

There's no difference from navigating the subframe or removing the 
subframe from the parent DOM in terms of the script context going away, 
yet they'd be treated differently in Andrew's proposal.

Seems to me like the subframe should just send the messages in this 
situation.

-Boris
Received on Monday, 5 January 2009 16:28:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:29 GMT