mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 23:50:02 -04:00
Revert "fix: refrencing wrong globals in location proxy"
This reverts commit ead9d160a9
.
This commit is contained in:
parent
e7f05aecd3
commit
7e11458621
2 changed files with 7 additions and 7 deletions
|
@ -166,8 +166,8 @@ export class ScramjetClient {
|
|||
const module = context(key);
|
||||
if (!key.endsWith(".ts")) continue;
|
||||
if (
|
||||
(key.startsWith("./dom/") && "window" in this.global) ||
|
||||
(key.startsWith("./worker/") && "WorkerGlobalScope" in this.global) ||
|
||||
(key.startsWith("./dom/") && "window" in self) ||
|
||||
(key.startsWith("./worker/") && "WorkerGlobalScope" in self) ||
|
||||
key.startsWith("./shared/")
|
||||
) {
|
||||
modules.push(module);
|
||||
|
@ -189,7 +189,7 @@ export class ScramjetClient {
|
|||
}
|
||||
|
||||
get url(): URL {
|
||||
return new URL(decodeUrl(this.global.location.href));
|
||||
return new URL(decodeUrl(self.location.href));
|
||||
}
|
||||
|
||||
set url(url: URL | string) {
|
||||
|
@ -201,7 +201,7 @@ export class ScramjetClient {
|
|||
}
|
||||
if (ev.defaultPrevented) return;
|
||||
|
||||
this.global.location.href = encodeUrl(ev.url, this.meta);
|
||||
self.location.href = encodeUrl(ev.url, this.meta);
|
||||
}
|
||||
|
||||
// below are the utilities for proxying and trapping dom APIs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue