respec
respec copied to clipboard
Convert respec-worker as an ES module
As part of #1640:
A worker script can be a module if we construct it by new Worker(url, { type: "module" }). I think this will ultimately benefit #1469 where we can load it as a module that can also work in Node.js.
- [x] Wait until browsers support it
That be very cool. Do you have any details about {type: "module"} support?
MDN: https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker Spec: https://html.spec.whatwg.org/multipage/workers.html#dedicated-workers-and-the-worker-interface Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=680046 Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1247687 Safari: https://bugs.webkit.org/show_bug.cgi?id=164860
An interesting support indicator: https://aremodulesready.com/
It seems it currently lacks any browser support.
Seems it’s now supported across all browsers. So, might be time 😎
Oh wait… firefox not done yet.