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

COOP+COEP: javascript: URLs #21230

Merged
merged 1 commit into from Feb 6, 2020
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Jan 17, 2020

No description provided.

@annevk

This comment has been minimized.

@annevk
Copy link
Member Author

annevk commented Jan 21, 2020

The idea is that a javascript: URL's newly generated document copies the policy from the document it ends up replacing.

@gsnedders gsnedders closed this Jan 24, 2020
@gsnedders gsnedders deleted the annevk/coop-coep-javascript-urls branch January 24, 2020 18:01
@gsnedders gsnedders restored the annevk/coop-coep-javascript-urls branch January 24, 2020 18:47
@Hexcles Hexcles reopened this Jan 24, 2020
@annevk
Copy link
Member Author

annevk commented Feb 5, 2020

@ParisMeuleman @hemeryar ping.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-21230 February 5, 2020 14:42 Inactive
Copy link
Contributor

@hemeryar hemeryar left a comment

Choose a reason for hiding this comment

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

lgtm, with just one question

t.add_cleanup(() => frame.remove());
frame.src = "resources/coep-frame.html";
frame.onload = t.step_func(() => {
frame.onload = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity:
I have seen tests that assume this automatically for popups. Do we need it explicitely here because it is an iframe or because it is a javascript url?

Copy link
Contributor

Choose a reason for hiding this comment

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

(Talking about frame.onload = null)

Copy link
Member Author

Choose a reason for hiding this comment

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

Some browsers dispatch the load event for javascript URLs (as is required) and others did not. So if you do not do this, you end up with a loop, at least in some browsers.

@annevk annevk force-pushed the annevk/coop-coep-javascript-urls branch from 6c19f0c to a54b263 Compare February 6, 2020 15:21
@annevk annevk merged commit 5c53b0a into master Feb 6, 2020
@annevk annevk deleted the annevk/coop-coep-javascript-urls branch February 6, 2020 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants