`confirm()`, `alert()`, `prompt()` and similar are widely regarded as mistakes. Including them on your new Electron app isn't something you should be doing in the first place.
Indeed:
https://developers.google.com/web/updates/2017/03/dialogs-po...
Electron has native dialog APIs: https://electronjs.org/docs/api/dialog
On the flip side Electron explicitly does not impliment confirm() and prompt() which made me furious.
So there is definitely truth in the general js=cluster-fuck sentiment.