3 ms·
Stay Alert
- armchairhacker 5y agoWhat if instead of disabling alert etc. browsers just changed their appearance so that it doesn’t look like a system dialog? Make it equivalent to something users could replicate with pure DOM manipulation. That would prevent tricking users into thinking the alert was a system thing or spamming them with unblockable popups (the alert would only freeze the site not the browser), without breaking any sites.
- brundolf 5y agoI don't think its appearance is part of the problem, and at least on desktop I think it already only blocks it's own website and not the whole browser
- flemhans 5y agoBut still, if they mapped alert calls to being something like a <div> overlay (which you can still do in the iframe), wouldn't it solve the problem without breaking compatibility?
- bariumbitmap 5y agoI found the linked blog post insightful, but there is plenty of prior discussion. > Canistilluse.com (359 comments) https://news.ycombinator.com/item?id=28309885 https://news.ycombinator.com/item?id=28309885 > Implement window.{alert, prompt, confirm} removal from cross-origin iframes (147 comments) https://news.ycombinator.com/item?id=28055160 https://news.ycombinator.com/item?id=28055160 > Google is considering removing alert() (39 comments) https://news.ycombinator.com/item?id=28064290 https://news.ycombinator.com/item?id=28064290 > Proposed Chromium policy on JavaScript dialogs (2017, 18 comments) https://news.ycombinator.com/item?id=13981579 https://news.ycombinator.com/item?id=13981579 > Google Chrome to remove alert() inside cross-origin iframes in a future version (4 comments) https://news.ycombinator.com/item?id=28070437 https://news.ycombinator.com/item?id=28070437 > Chromium plans to remove alert(), confirm(), prompt() (1 comment) https://news.ycombinator.com/item?id=28003125 https://news.ycombinator.com/item?id=28003125 > Foundations (0 comments) https://news.ycombinator.com/item?id=28088791 https://news.ycombinator.com/item?id=28088791 > Choice Words about the Upcoming Deprecation of JavaScript Dialogs (0 comments) https://news.ycombinator.com/item?id=28129579 https://news.ycombinator.com/item?id=28129579 https://news.ycombinator.com/item?id=28311776 https://news.ycombinator.com/item?id=28311776 > Slow path to deprecate and remove window.alert/confirm/prompt (0 comments) https://news.ycombinator.com/item?id=28071267 https://news.ycombinator.com/item?id=28071267 > Chrome plans to Dismiss JavaScript dialogs on switch-away (2017, 0 comments) https://news.ycombinator.com/item?id=13995506 https://news.ycombinator.com/item?id=13995506