Live data from Hacker News

Google is considering removing alert()

twitter.com

31–40 of 41 posts

Re: Google is considering removing alert()

#31
post #27

Earlier quoted context omitted.

That breaks the web by definition. There is no way to implement a non-blocking alert(), confirm(), or prompt() in a way that doesn't break existing code that uses them, and that's a lot of code, a lot of the web.

It can block JavaScript execution on the page for compatibility with existing code, while leaving normal browsing unaffected otherwise.

the alert(), confirm(), and prompt() themselves interrupt normal browsing, so I'm not sure what you mean here. They're synchronous so block the main thread, but they also block other user interactions until they're dismissed, so what would be the benefit in leaving normal browsing unaffected if the user cannot browse anyway?

Re: Google is considering removing alert()

#32

https://twitter.com/estark37/status/1422694856544059396 > as a developer it's good practice to test against early release channels of major browsers to learn about any compatibility issues upfront This is a rather alarming viewpoint which I think highlights Chrome's quest to become the One True Implementation of web standards. In addition to the major browser vendors I'm now supposed to be testing against beta and ni…

Contrary to what seems to be Google's belief, most websites are _not_ continuously deployed SPAs with a team of engineers who work on each release. The indifference shown to actual developers here is staggering.

Well said. It's stunning how ignorant Google is about the web. The vast majority of the web is old and poorly maintained or not maintained at all. It relies on things not breaking, web tech being backwards compatible.

This assumption that behind every website is a team of developers maintaining it for its entire lifecycle is a stubborn and elitist Google fantasy.

Re: Google is considering removing alert()

#33
post #32

Earlier quoted context omitted.

Contrary to what seems to be Google's belief, most websites are _not_ continuously deployed SPAs with a team of engineers who work on each release. The indifference shown to actual developers here is staggering.

Well said. It's stunning how ignorant Google is about the web. The vast majority of the web is old and poorly maintained or not maintained at all. It relies on things not breaking, web tech being backwards compatible. This assumption that behind every website is a team of developers maintaining it for its entire lifecycle is a stubborn and elitist Google fantasy.

They're imperious, but never ignorant. A website without a team of maintainers is beneath their concern. What are you going to do, fax them a nastygram about it?

Re: Google is considering removing alert()

#34
post #33
post #32

Earlier quoted context omitted.

Well said. It's stunning how ignorant Google is about the web. The vast majority of the web is old and poorly maintained or not maintained at all. It relies on things not breaking, web tech being backwards compatible. This assumption that behind every website is a team of developers maintaining it for its entire lifecycle is a stubborn and elitist Google fantasy.

They're imperious, but never ignorant. A website without a team of maintainers is beneath their concern. What are you going to do, fax them a nastygram about it?

You're right, we can't do much about it. Even if a Google change harms a million people, they consider it peanuts.

Yet..."arrogance precedes the fall".

One day they will pay the price for their carelessness and harm, and I welcome that day.

Re: Google is considering removing alert()

#35
post #16

Earlier quoted context omitted.

>i'm gonna be honest, i havent seen a meaningful alert be used in recent memory, and i work with a lot of web apps. I see them used very often to indicate unsaved changes when a user leaves a page.

Isnt that confirm()

> In general all of the simple dialogs (alert(), prompt(), confirm(), and beforeunload) are deprecated and being removed slowly but surely from the web platform. They use trusted browser UI, which opens them up to abuse, and they block the event loop, which is not in keeping with the web's cooperative task model. So this is just a first step toward eventually completely removing them, which will take many years.

https://github.com/whatwg/html/issues/6897#issuecomment-8857...

Re: Google is considering removing alert()

#39

Good. Alert is an archaic mechanism with tons of useful alternatives that don't involve blocking the DOM. For example, console log for debugging/demoing. On the other hand, I'm seriously worried that Google is using its position to force large changes to the web.

>Alert is an archaic mechanism with tons of useful alternatives that don't involve blocking the DOM.

event loop, but the _whole point_ of Alert is being MODAL and BLOCKING. If I didnt care about that I would just pop fixed position div. Its meant to pause whole page, thats its designed role.

I seem to remember browsers (Netscape or Opera?) around 1999 having "Never show this dialog again" checkboxes meant to prevent alert() spam.

Re: Google is considering removing alert()

#40

No. They are not. They are considering disabling it for cross-origin alerts from iframes. https://twitter.com/estark37/status/1422694845076762629?s=21 Everything else is speculation. It may even be likely speculation! But it is speculation nonetheless.

It would be speculation to say "Google is removing alert()"

It is not speculation to say "Google is considering removing alert()". Multiple engineers from Chrome have confirmed on Twitter that they have an eventual goal of removing alert() at some point in the future (or making it non-blocking and removing prompt/confirm, which is the same thing). See https://twitr.gq/domenic/status/1422647331804037120 as one example.

Maybe it won't happen! There's a lot of time for feedback. But it is accurate to say that Google is considering it.

Also as a small sidenote, they are not considering removing alert() for cross-origin iframes. They are removing it for cross-origin iframes and have very temporarily walked the changes back in order to give devs more time to prepare. Short of some kind of massive blowback that forces the devs to change their mind, Chrome's decision to remove alert() from cross-origin iframes has already been finalized.

Post reply on HN