[whatwg] prompts, alerts and showModalDialog during beforeunload/unload events

2010/2/11 Scott Gonz?lez <scott.gonzalez at gmail.com>:
> On Thu, Feb 11, 2010 at 9:55 PM, Tab Atkins Jr. <jackalmage at gmail.com>
> wrote:
>>
>> I commonly see them put to *good* use by editting applications,
>> warning you if you attempt to leave the page without saving. ?It has
>> saved me from accidentally lost effort just in the past few days in
>> both my email and one of my wikis.
>
> I use dialogs in this fashion as well. Users get very frustrated when they
> accidentally leave a page with unsaved content and this is the easiest
> improvement for most developers to make.

However you can accomplish this using the onbeforeunload return value.
No need to open modal dialogs using showModalDialog/input()/alert()
etc.

Though I'm not sure what exactly Ojan is proposing we forbid?

/ Jonas

Received on Thursday, 11 February 2010 19:42:32 UTC