diff options
Diffstat (limited to 'tests/specs/run/location/location.js')
| -rw-r--r-- | tests/specs/run/location/location.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/specs/run/location/location.js b/tests/specs/run/location/location.js new file mode 100644 index 000000000..8562a3995 --- /dev/null +++ b/tests/specs/run/location/location.js @@ -0,0 +1,24 @@ +let _location = undefined; + +console.log(globalThis.location); + +Object.defineProperty(globalThis, "location", { + get() { + return _location; + }, + set(v) { + _location = v; + }, + configurable: true, +}); + +console.log(globalThis.location); + +globalThis.location = "https://deno.com"; + +console.log(_location); +console.log(location); + +delete globalThis["location"]; + +console.log(globalThis.location); |
