mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
feat: add --location=<href> and globalThis.location (#7369)
This commit is contained in:
parent
c347dfcd56
commit
e61e81eb57
34 changed files with 737 additions and 193 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue