This commit is contained in:
velzie 2024-08-30 17:32:28 -04:00
parent e0671f4648
commit 0d84f77084
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
3 changed files with 22 additions and 1 deletions

View file

@ -68,8 +68,10 @@ export class ScramjetClient {
constructor(public global: typeof globalThis) {
this.serviceWorker = this.global.navigator.serviceWorker;
if ("document" in self) {
if ("document" in global) {
this.documentProxy = createDocumentProxy(this, global);
global.document[SCRAMJETCLIENT] = this;
}
this.locationProxy = createLocationProxy(this, global);