summaryrefslogtreecommitdiff
path: root/docs/runtime/workers.md
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2021-01-07 18:06:08 +0000
committerGitHub <noreply@github.com>2021-01-07 19:06:08 +0100
commite61e81eb57351782862aa50775ce4348f10b1856 (patch)
tree6099aa60857f586774a195034f18ac1fb10ca519 /docs/runtime/workers.md
parentc347dfcd565c3a396ae84dff46e7374851913462 (diff)
feat: add --location=<href> and globalThis.location (#7369)
Diffstat (limited to 'docs/runtime/workers.md')
-rw-r--r--docs/runtime/workers.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/runtime/workers.md b/docs/runtime/workers.md
index 14e028705..82e1e5b2d 100644
--- a/docs/runtime/workers.md
+++ b/docs/runtime/workers.md
@@ -9,10 +9,11 @@ is run on a separate thread, dedicated only to that worker.
Currently Deno supports only `module` type workers; thus it's essential to pass
the `type: "module"` option when creating a new worker.
-Relative module specifiers are
-[not supported](https://github.com/denoland/deno/issues/5216) at the moment. You
-can instead use the `URL` constructor and `import.meta.url` to easily create a
-specifier for some nearby script.
+Use of relative module specifiers in the main worker are only supported with
+`--location <href>` passed on the CLI. This is not recommended for portability.
+You can instead use the `URL` contructor and `import.meta.url` to easily create
+a specifier for some nearby script. Dedicated workers, however, have a location
+and this capability by default.
```ts
// Good