mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
warn against multijetting
This commit is contained in:
parent
7ff1f2c979
commit
1438a11bbf
1 changed files with 7 additions and 0 deletions
|
@ -83,6 +83,13 @@ export class ScramjetClient {
|
||||||
meta: URLMeta;
|
meta: URLMeta;
|
||||||
|
|
||||||
constructor(public global: typeof globalThis) {
|
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;
|
this.serviceWorker = this.global.navigator.serviceWorker;
|
||||||
|
|
||||||
if (iswindow) {
|
if (iswindow) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue