Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note explaining allow-modals + allow-same-origin #6401

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

domenic
Copy link
Member

@domenic domenic commented Feb 19, 2021

@domenic domenic added the clarification Standard could be clearer label Feb 19, 2021
and <code data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code> keywords need to
be specified. Without the <code
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code> keyword, the content is
treated as cross-origin, and cross-origin content <span>cannot show simple dialogs</span>.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to call out that the content needs to be same-origin as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a clause explaining that. It's a little wishy-washy, as explaining this concisely without just duplicating the normative requirements is tricky. (E.g., talking about "the content" like the existing spec does.) Recall that this is in a web-developer-visible section. Any better suggestions are welcome.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing you need to change is that it needs to be same origin with the container document's origin. With that this seems fine to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm is that true? The "cannot show simple dialogs" check is with the top-level origin.

@domenic domenic merged commit 5f626a1 into main Feb 23, 2021
@domenic domenic deleted the modals-different-domain-sandbox branch February 23, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

Successfully merging this pull request may close these issues.

Proposal: Disallow cross-origin iframes usage of window.{alert, confirm, prompt}
2 participants