Skip to content

Commit

Permalink
warn against multijetting
Browse files Browse the repository at this point in the history
  • Loading branch information
velzie committed Oct 18, 2024
1 parent 7ff1f2c commit 1438a11
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ export class ScramjetClient {
meta: URLMeta;

constructor(public global: typeof globalThis) {
if (SCRAMJETCLIENT in global) {
console.error(
"attempted to initialize a scramjet client, but one is already loaded - this is very bad"
);
throw new Error();
}

this.serviceWorker = this.global.navigator.serviceWorker;

if (iswindow) {
Expand Down

0 comments on commit 1438a11

Please sign in to comment.