[wpt-sync] Sync PR 22299 - Test if CORS-enable module workers can be instantiated
Categories
(Core :: DOM: Workers, task, P4)
Tracking
()
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)
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Description
•