mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix(cli/js/web/worker): Disable relative module specifiers (#5266)
This commit is contained in:
parent
81a6f673ad
commit
44251ce8ea
7 changed files with 80 additions and 55 deletions
5
cli/js/lib.deno.shared_globals.d.ts
vendored
5
cli/js/lib.deno.shared_globals.d.ts
vendored
|
@ -1300,7 +1300,10 @@ declare class Worker extends EventTarget {
|
|||
*
|
||||
* ```ts
|
||||
* // mod.ts
|
||||
* const worker = new Worker("./deno_worker.ts", { type: "module", deno: true });
|
||||
* const worker = new Worker(
|
||||
* new URL("deno_worker.ts", import.meta.url).href,
|
||||
* { type: "module", deno: true }
|
||||
* );
|
||||
* worker.postMessage({ cmd: "readFile", fileName: "./log.txt" });
|
||||
*
|
||||
* // deno_worker.ts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue