Hacker News new | ask | show | jobs
by phpnode 1785 days ago
You're underestimating the level of breakage here, it's not just a few tutorial sites it's tens of millions of websites, many unmaintained. Like them or not alert(), confirm() and prompt() are key pieces of functionality depended on for literally decades now. I'm trying to imagine the economic cost of this change and it's just enormous.
2 comments

I understand that. But that was the case with popups as well. Remember when we needed popup blockers? Straight up removing the functionality is of course a drastic measure, so realistically I could see something like what we did with popups, where the browser first asks you if you'd like to allow alerts on the page, and only allow them to be shown if the user explicitly chooses so.
This is the fix. Deprecate alerts gracefully in favor of the native dialogue element!
I still see them everywhere.
It's only blocking when inside an iframe.

There may be millions of sites using these functions legitimately, but not inside an iframe.