W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] Declarative unload data

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 07 May 2012 13:00:42 -0400
Message-ID: <4FA7FFBA.3010408@mit.edu>
On 5/7/12 12:10 PM, Bronislav Klu?ka wrote:
> I'm not sure about whole functionality removed without replacement...
> You wrote to Tab "the legitimate use-case for popup windows is also
> reasonable, yet browsers have popup blockers." sure, but this
> functionality was not removed, etc...

There are plenty of other things that browsers have removed altogether.

For example, renavigating the page during an unload handler: this used 
to be allowed in Gecko at some point and was removed if the renavigation 
is not same-origin with the original navigation, to prevent abuse. 
Looks like Opera has the same behavior as Gecko here; WebKit just 
disallows all renavigation in unload (we tried that in Gecko, but it 
broke some sites).

Another example: alerts in unload.  Opera and Chrome no longer allow those.

Notice the pattern: these have to do with user-hostile behavior in unload.

> I can imagine no DOM/browsing
> context manipulation (even new browsing context) by default, only on opt
> in (but when the optin? before the beforeunload :) ?) But disabling it
> altogethe, because someone may alert "Do you really want to exit this
> page?"?

We're not talking about beforeunload.  That exists specifically for the 
purpose of prompting users.  We're talking about unload.

As far as where to put the opt-in, in Tab's proposal that's trivial: you 
put it at the point where .data is set.

-Boris
Received on Monday, 7 May 2012 10:00:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT