4 ms·
Removing alert is nonsense, and I don't think they will ever do (without breaking a ton of websites that use it). Why as a developer should I have to make a mod
by alerighi 5y ago
Removing alert is nonsense, and I don't think they will ever do (without breaking a ton of websites that use it). Why as a developer should I have to make a modal with HTML+CSS+JS to show it to just have a prompt that inform the user about something?
Ok, alert is ugly, but for a lot of situations (= industrial software) it's perfectly acceptable.
- antifa 5y agoWhy as a user should I have to endure a website with an intrusive user of alert? I don't care what happens to websites that use alert, I never want to see my browser get locked up because of lazy devs wanting to use alerts.
- ______-_-______ 5y agoAlerts haven't locked up the browser since the Bush administration.
- antifa 5y agoFrrl free to update https://stackoverflow.com/questions/8825384/alert-is-bad-really https://stackoverflow.com/questions/8825384/alert-is-bad-rea... with new information.
- ______-_-______ 5y agoThat question has been closed and locked since Obama's first term
- aidos 5y agoThat only because the implementation is poor. It doesn’t have to be intrusive.
- eyelidlessness 5y agoSort of. This can obviously be non-blocking and redirected to whatever stdin-ish receiver you prefer: alert('whatever'); This cannot: const answer = confirm('A querstion?'); const value = doSomethingWithUserInput(answer); return doSomethingWithValue(value); The API depends on it blocking the main thread, and removing that expectation is effectively just as disruptive as removing the feature entirely: non-abusive usage would have no reason to call this function if not to block for user input. Introducing some magical suspension of the stack like async/await or generators would break assumptions about the entire concurrent execution model of the language (the inverse problem of “colored functions”, infectious async/await etc). The best thing they can do without removing the API is provide an escape hatch, which most browsers already do when alert &co are called multiple times in quick succession.
- ui4jd73bdj 5y agoAlert doesn't lock your browser. The developer can spend a lot of time and effort to make an even more intrusive and annoying custom alert. Why should I as a user have to endure instagram and twitter blocking content with a delayed login prompt that cannot be canceled? Because they can. Browser APIs or not malicious developers will be malicious.
- oh_sigh 5y agoYes it does. You can't click on the URL bar and just navigate to a different site in chrome while an alert is displayed.
- slibhb 5y agoI can.
- ByteJockey 5y agoYou can in firefox (just tried from the console).
- WA 5y agoSome devs want to use the native UI, but this isn’t okay either apparently. So are you advocating that every dev should implement their own alert modal?
- solarkraft 5y agoBrowsers are well equipped to deal with alert() abuse. You can usually block them after the second one.