summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
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 /runtime/web_worker.rs
parentc347dfcd565c3a396ae84dff46e7374851913462 (diff)
feat: add --location=<href> and globalThis.location (#7369)
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 313c71177..3a1f5316c 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -130,6 +130,7 @@ pub struct WebWorker {
terminate_rx: mpsc::Receiver<()>,
handle: WebWorkerHandle,
pub use_deno_namespace: bool,
+ pub main_module: ModuleSpecifier,
}
pub struct WebWorkerOptions {
@@ -197,6 +198,7 @@ impl WebWorker {
terminate_rx,
handle,
use_deno_namespace: options.use_deno_namespace,
+ main_module: main_module.clone(),
};
{
@@ -286,6 +288,7 @@ impl WebWorker {
"tsVersion": options.ts_version,
"unstableFlag": options.unstable,
"v8Version": deno_core::v8_version(),
+ "location": self.main_module,
});
let runtime_options_str =