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:
Bartek Iwańczuk 2024-09-23 13:18:07 +01:00 committed by GitHub
parent 8f32a1577e
commit 08d3f17110
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 0 deletions

View file

@ -654,6 +654,7 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
if (location_ == null) {
mainRuntimeGlobalProperties.location = {
writable: true,
configurable: true,
};
} else {
location.setLocationHref(location_);