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

Should throw SecurityError when loading a worker with a cross-origin script #9794

Closed
edenchuang opened this issue Sep 26, 2023 · 2 comments
Closed
Labels
agenda+ To be discussed at a triage meeting topic: workers

Comments

@edenchuang
Copy link

According to https://html.spec.whatwg.org/#dom-worker, it is not necessary to throw a synchronous security error when the script is a cross-origin URL.

So Firefox implements with dispatching an ErrorEvent to the WorkerScope once the script violates the cross-origin policy.
However, Chromium and Safari implementation will throw a SecurityError immediately.

This causes web developers complain the different behavior between browsers. So I fire this issue to discuss if the spec needs to update.

@annevk annevk added the agenda+ To be discussed at a triage meeting label Sep 26, 2023
@annevk
Copy link
Member

annevk commented Sep 26, 2023

See web-platform-tests/wpt#41745 which is awaiting a reply from @hiroshige-g. Given it's almost been a month maybe it's time to agenda+.

cc @youennf

@domenic
Copy link
Member

domenic commented Oct 24, 2023

It seems there is no more spec work to do here and we are keeping this issue open so that Youenn can hear more about Chromium's engineering plans? (I think the thing which is "awaiting reply" is web-platform-tests/wpt#41745 (comment), correct?)

I've pinged @hiroshige-g but I'll close this since there doesn't appear to be a spec issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agenda+ To be discussed at a triage meeting topic: workers
Development

No branches or pull requests

4 participants
@domenic @annevk @edenchuang and others