warn against multijetting

This commit is contained in:
velzie 2024-10-18 15:23:44 -04:00
parent 7ff1f2c979
commit 1438a11bbf
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820

View file

@ -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) {