Skip to content

Add top-level origin check#244

Open
annevk wants to merge 1 commit intomainfrom
annevk/top-level-origin-guard
Open

Add top-level origin check#244
annevk wants to merge 1 commit intomainfrom
annevk/top-level-origin-guard

Conversation

@annevk
Copy link
Copy Markdown
Member

@annevk annevk commented Mar 28, 2026

Fixes #177.

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)

@annevk annevk requested review from johannhof and saschanaz March 28, 2026 12:25
Copy link
Copy Markdown
Member

@johannhof johannhof left a comment

Choose a reason for hiding this comment

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

This seems to match Chrome's behavior, thanks

@annevk
Copy link
Copy Markdown
Member Author

annevk commented Mar 31, 2026

Do you happen to know if we have any test coverage for this?

@saschanaz
Copy link
Copy Markdown
Member

What is "top level" here? HTML says "implementation defined"... Is it supposed to check the top window's origin?

Gecko blocks any request if a third party iframe is involved at all - ABA is also blocked. Per our telemetry nobody is doing ABA permission request and so far nobody complained.

@annevk
Copy link
Copy Markdown
Member Author

annevk commented Mar 31, 2026

It's implementation-defined for shared/service workers only so I guess your question is what should happen for shared workers since service workers are handled already? It's a good question and I'm not sure any of that is well-defined at the moment.

@saschanaz
Copy link
Copy Markdown
Member

@johannhof
Copy link
Copy Markdown
Member

Interesting, Chrome should not fail these. I filed https://issues.chromium.org/498745938.

We can probably also make it non-tentative?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Usage in cross-origin iframes

3 participants