properly rewrite postmessage

This commit is contained in:
velzie 2024-07-28 14:41:44 -04:00
parent 34c3cc5094
commit c2d147442e
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
9 changed files with 134 additions and 17 deletions

View file

@ -2,6 +2,16 @@
import { ScramjetClient } from "./client";
export const iswindow = "window" in self;
export const isworker = "WorkerGlobalScope" in self;
export const issw = "ServiceWorkerGlobalScope" in self;
export const isdedicated = "DedicatedWorkerGlobalScope" in self;
export const isshared = "SharedWorkerGlobalScope" in self;
export const wrapfn = "$scramjet$wrap";
export const trysetfn = "$scramjet$tryset";
export const importfn = "$scramjet$import";
dbg.log("scrammin");
// if it already exists, that means the handlers have probably already been setup by the parent document
if (!(ScramjetClient.SCRAMJET in self)) {