[whatwg] Declarative unload data
bzbarsky at MIT.EDU
Mon May 7 10:00:42 PDT 2012
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
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.
More information about the whatwg