[whatwg] Can we deprecate alert(), confirm(), prompt() ?
Simetrical+w3c at gmail.com
Thu Nov 25 15:22:58 PST 2010
On Thu, Nov 25, 2010 at 1:29 AM, Biju <bijumaillist at gmail.com> wrote:
> 1. Can we deprecate alert(), confirm(), prompt() ?
> At present many web2.0 js libs are providing alternate [and cool
> looking] methods to achieve use cases where we need to use alert(),
> confirm(), prompt(). So do we need those modal dialogs any longer?
It's a very basic feature, necessary even for "Hello World"-type
to get this functionality.
> 2. if we are still keeping them, can we disable them in
> onbeforeunload/onunload[/onhide] etc. Many sites add extra dialogs in
> those events to confuse users, so that they can trap users for little
This is a browser implementation issue. Browsers should allow users
to suppress modal dialogs, and should make them tab-modal instead of
window-modal. They're in the process of doing this -- no spec change
is needed, and a spec change will not speed the process.
> 3. also if we are keeping them, can we add an optional parameter for a
> timeout milliseconds to self dismiss the modal prompt.
You mean the author should be able to add a parameter saying "dismiss
this alert() after 10 seconds if the user hasn't clicked"? That's a
bad idea. What if I opened the tab in the background, or had another
window active, or was just off getting coffee when the dialog popped
up? I'd never see it. We shouldn't make it easy for authors to do
More information about the whatwg