diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-01-17 15:28:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 16:28:54 +0100 |
commit | 7db0605d456559f1ca9447e6fa778559fe50cc95 (patch) | |
tree | 8607446306b6e526dab149a465cac3e3d825b96b /runtime/js | |
parent | f4dbb267c6672f92605bc204b10ad9a96d160ef4 (diff) |
fix(op_crates/web): Use WorkerLocation for location in workers (#9084)
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/99_main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index b55074355..a6abc8d27 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -197,8 +197,6 @@ delete Object.prototype.__proto__; // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope const windowOrWorkerGlobalScope = { - Location: location.locationConstructorDescriptor, - location: location.locationDescriptor, Blob: util.nonEnumerable(fetch.Blob), ByteLengthQueuingStrategy: util.nonEnumerable( streams.ByteLengthQueuingStrategy, @@ -257,6 +255,8 @@ delete Object.prototype.__proto__; windowOrWorkerGlobalScope.console.enumerable = false; const mainRuntimeGlobalProperties = { + Location: location.locationConstructorDescriptor, + location: location.locationDescriptor, Window: globalInterfaces.windowConstructorDescriptor, window: util.readOnly(globalThis), self: util.readOnly(globalThis), @@ -272,6 +272,8 @@ delete Object.prototype.__proto__; }; const workerRuntimeGlobalProperties = { + WorkerLocation: location.workerLocationConstructorDescriptor, + location: location.workerLocationDescriptor, WorkerGlobalScope: globalInterfaces.workerGlobalScopeConstructorDescriptor, DedicatedWorkerGlobalScope: globalInterfaces.dedicatedWorkerGlobalScopeConstructorDescriptor, |