1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/tests/specs/run/location/location.js

25 lines
402 B
JavaScript
Raw Normal View History

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);