This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28818 - Block modal dialogs in sandboxed iframes.
Summary: Block modal dialogs in sandboxed iframes.
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 07:25 UTC by Mike West
Modified: 2015-09-01 14:10 UTC (History)
4 users (show)

See Also:


Attachments

Description Mike West 2015-06-16 07:25:03 UTC
# Spec

Just mailing list conversation at https://lists.w3.org/Archives/Public/public-whatwg-archive/2015May/0035.html; I'm hopeful we can get it into HTML if folks think it's a reasonable addition.

# Summary

`alert()`, `confirm()`, `prompt()`, and `print()` will no longer have any affect inside sandboxed documents; they will instead synchronously return a reasonable default value (`false` for `confirm()`, and `null` for `prompt()`) without prompting the user.

# Motivation

Folks in Google's anti-malvertising team would like to be able to prevent sandboxed frames from popping up confusing, modal messages to users. Ideally, we could simply block those entirely inside sandboxed frames (as Hixie vaguely suggested in https://lists.w3.org/Archives/Public/public-whatwg-archive/2014May/0002.html). I suspect that the numbers will be low enough to make that change without much risk (sandboxing itself is hovering around 0.6% of page loads: https://www.chromestatus.com/metrics/feature/timeline/popularity/672).

# Link to entry on the Chromium Dashboard

https://www.chromestatus.com/features/4747009953103872

(I've implemented this behind a flag in Blink with an `allow-modals` keyword)
Comment 1 Mike West 2015-07-16 06:48:10 UTC
CCing Dan and Boris here as well.
Comment 2 Anne 2015-09-01 14:10:52 UTC
https://github.com/whatwg/html/pull/48