diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-01-21 01:30:30 +1100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2020-01-20 09:30:30 -0500 |
commit | 60b53fd6b6dc2af83a64c332b9f3a1926f43d631 (patch) | |
tree | 4f4ef1aadb8c79ef2319d728b9d5b132af40ef83 /cli/js/url.ts | |
parent | 23e67eb5153bd26dbae471b27dc6a21a6d283b0b (diff) |
Use globalThis to reference global scope (#3719)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/js/url.ts')
-rw-r--r-- | cli/js/url.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/url.ts b/cli/js/url.ts index 1619ec26f..477ca7c2a 100644 --- a/cli/js/url.ts +++ b/cli/js/url.ts @@ -2,7 +2,6 @@ import * as urlSearchParams from "./url_search_params.ts"; import * as domTypes from "./dom_types.ts"; import { getRandomValues } from "./get_random_values.ts"; -import { window } from "./window.ts"; import { customInspect } from "./console.ts"; interface URLParts { @@ -374,7 +373,7 @@ export class URL { // TODO(kevinkassimo): implement MediaSource version in the future. static createObjectURL(b: domTypes.Blob): string { - const origin = window.location.origin || "http://deno-opaque-origin"; + const origin = globalThis.location.origin || "http://deno-opaque-origin"; const key = `blob:${origin}/${generateUUID()}`; blobURLMap.set(key, b); return key; @@ -391,7 +390,7 @@ export class URL { return; } // Origin match check seems irrelevant for now, unless we implement - // persisten storage for per window.location.origin at some point. + // persisten storage for per globalThis.location.origin at some point. blobURLMap.delete(url); } } |