(In reply to Hamish Willee from comment #11) > FF114 MDN docs for this can be tracked in https://github.com/mdn/content/issues/26149 (and possibly some aspects in https://github.com/mdn/content/issues/26695). > > Can you please confirm what is delivered by this. My "understanding" is" > - Static import via [`import` statement](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) and dynamic import via [`import()` operator syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Import) inside: > - dedicated worker scripts > - shared worker scripts Correct for these two workers > - worklet scripts For worklets, only static import is supported (or import statements, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import). Dynamic import (or https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) on worklets is **DISALLOWED** per spec. https://html.spec.whatwg.org/multipage/webappapis.html#hostloadimportedmodule:workletglobalscope > - Support for worker modules using the [`Worker` constructor](https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker) option: `new Worker(..., {type: "module"})` Correct, and for SharedWorker it would be `new SharedWorker(script, {type: "module"})` > - No support for module import in service workers (static or dynamic)? If not, why? Modules on Service worker is being tracked in bug 1360870 As this is not a requirement for interop-2023 modules Check https://wpt.fyi/results/workers/modules?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2023-modules But we will try to land it soon. > Is there anything else that specifically needs to be mentioned? Other than dynamic import on worklets, above LGTM, I'll forward the ni? to jonco if he wants to add anything.
Bug 1812591 Comment 12 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Hamish Willee from comment #11) > FF114 MDN docs for this can be tracked in https://github.com/mdn/content/issues/26149 (and possibly some aspects in https://github.com/mdn/content/issues/26695). > > Can you please confirm what is delivered by this. My "understanding" is" > - Static import via [`import` statement](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) and dynamic import via [`import()` operator syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Import) inside: > - dedicated worker scripts > - shared worker scripts Correct for these two workers > - worklet scripts For worklets, only static import is supported (or `import statements`, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import). Dynamic import (or `import operator`, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) on worklets is **DISALLOWED** per spec. https://html.spec.whatwg.org/multipage/webappapis.html#hostloadimportedmodule:workletglobalscope > - Support for worker modules using the [`Worker` constructor](https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker) option: `new Worker(..., {type: "module"})` Correct, and for SharedWorker it would be `new SharedWorker(script, {type: "module"})` > - No support for module import in service workers (static or dynamic)? If not, why? Modules on Service worker is being tracked in bug 1360870 As this is not a requirement for interop-2023 modules Check https://wpt.fyi/results/workers/modules?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2023-modules But we will try to land it soon. > Is there anything else that specifically needs to be mentioned? Other than dynamic import on worklets, above LGTM, I'll forward the ni? to jonco if he wants to add anything.