mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat: make 'globalThis.location' a configurable property (#25812)
This commit changes `globalThis.location` property to be configurable so that packages wanting to override it (or delete it) work properly. Towards https://github.com/denoland/deno/issues/23882 This change makes reproduction from https://github.com/denoland/deno/issues/23882#issuecomment-2340783437 pass properly.
This commit is contained in:
parent
8f32a1577e
commit
08d3f17110
4 changed files with 38 additions and 0 deletions
|
@ -654,6 +654,7 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
|
|||
if (location_ == null) {
|
||||
mainRuntimeGlobalProperties.location = {
|
||||
writable: true,
|
||||
configurable: true,
|
||||
};
|
||||
} else {
|
||||
location.setLocationHref(location_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue