[whatwg] Can we deprecate alert(), confirm(), prompt() ?

On Thu, Nov 25, 2010 at 3:30 AM, Nils Dagsson Moskopp
>
>> 1. Can we deprecate alert(), confirm(), prompt() ?
>
> If sites rely on them, it is not possible to deprecate them.
That is why I asked to deprecate, but not obsolete..

> However, I melieve browsers are making these dialogs tab-modal.
Yes I know but still there are problems
https://bugzilla.mozilla.org/show_bug.cgi?id=613800#c1
(I assume that will be fixed)
But see also https://bugzilla.mozilla.org/show_bug.cgi?id=391834

>> 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
>> longer.
>
> ?Do you want to save your complicated mashup??
For that we dont need alert/confirm/prompt.
Return value in onbeforeunload will take care of it

You may want to also look Jesse Ruderman suggestion on that
https://bugzilla.mozilla.org/show_bug.cgi?id=578828

>> 3. also if we are keeping them, can we add an optional parameter for a
>> timeout milliseconds to self dismiss the modal prompt.
>
> Why would you need that?
This is especially useful with alert()
In a software application there is no need to have prompt to the user
if the application is not planning to do any branching after user
response.
When we have alert(), it dont give user any choice other than pressing OK
Hence it not possible to code any branching statement after result of
user action. (with exception "Press OK after you insert DVD to the
drive" )

So only use for alert() I see is not make a delay, that use case can
be improved if web programmer can provide a default time out.


On Thu, Nov 25, 2010 at 3:41 AM, ash at ashleysheridan.co.uk
<ash at ashleysheridan.co.uk> wrote:
> Modal dialogues have a very special purpose, which works consistently across
> various browsers in that we can program in with javascript some very
> specific responses. What would happen if someone came to your site with a
> speech/Braille browser? How would they know your pretty js lib built

That is a valid point. But how many good sites use
alert/confirm/prompt for every thing. So all those case speech/Braille
browser have problem to deal with.
If we want use that feature the web site need to code their site for
speech/Braille browser. If that is the case we could achieve same
thing with HTML.

Received on Thursday, 25 November 2010 04:21:36 UTC