Closed Bug 1623078 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 22299 - Test if CORS-enable module workers can be instantiated

Categories

(Core :: DOM: Workers, task, P4)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 22299 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/22299
Details from upstream follow.

Surma <surma@surma.link> wrote:

Test if CORS-enable module workers can be instantiated

The spec reads:

Note that such module-based workers follow different restrictions regarding cross-origin content, compared to classic workers. Unlike classic workers, module workers can be instantiated using a cross-origin script, as long as that script is exposed using the CORS protocol. Additionally, the importScripts() method will automatically fail inside module workers; the JavaScript import statement is generally a better choice.

AFAICT, there was no test for this and Chrome is currently not spec compliant in that it throws when you try to instantiate a module Worker with a cross-origin script. (Bug to be filed.)

(cc @jakearchibald @developit)

Component: web-platform-tests → DOM: Workers
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.