diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-01-07 18:06:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 19:06:08 +0100 |
commit | e61e81eb57351782862aa50775ce4348f10b1856 (patch) | |
tree | 6099aa60857f586774a195034f18ac1fb10ca519 /runtime/worker.rs | |
parent | c347dfcd565c3a396ae84dff46e7374851913462 (diff) |
feat: add --location=<href> and globalThis.location (#7369)
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r-- | runtime/worker.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs index 9326d632e..6ebb2fb36 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -63,6 +63,7 @@ pub struct WorkerOptions { /// Sets `Deno.noColor` in JS runtime. pub no_color: bool, pub get_error_class_fn: Option<GetErrorClassFn>, + pub location: Option<Url>, } impl MainWorker { @@ -179,6 +180,7 @@ impl MainWorker { "tsVersion": options.ts_version, "unstableFlag": options.unstable, "v8Version": deno_core::v8_version(), + "location": options.location, }); let script = format!( @@ -282,6 +284,7 @@ mod tests { ts_version: "x".to_string(), no_color: true, get_error_class_fn: None, + location: None, }; MainWorker::from_options(main_module, permissions, &options) |