DEV Community 👩‍💻👨‍💻

Discussion on: Stay alert

devinrhode2 profile image
Devin Rhode • Edited on

I pray for one thing and one thing only.
When you call alert, if it's been removed, the page needs to fucking crash. It is not safe to assume that you can just pretend the function call does not exist.
alert("Are you sure you want to delete your account? This is irreversible")
Browser has no safe choice but to crash tab completely, throw an error, or return early.

const confirmed = confirm("Dear Federal Agent, are you sure you want to launch the missiles?")
Could the browser just return false for every confirm call?

How about:
const input = prompt("Enter STOP to prevent launching the nukes")
if (input === "STOP") return

Ah, Google's AI can decide what the input should be!

I really don't think they've explored things enough. The fact that we are all caught off guard is proof they are not working hard enough. I hate to say it, but it seems like they just don't give a shit. Seriously, there's so many little things that the team could be doing but are not.