summaryrefslogtreecommitdiff
path: root/tests/specs/run/location/location.js
blob: 8562a39957d084ac2706c97e60e9e415f20fb38d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);