mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
parent
759ebd747e
commit
35b1d08bfb
21 changed files with 196 additions and 257 deletions
13
static/sw.js
13
static/sw.js
|
@ -1,6 +1,7 @@
|
|||
import { ScramjetServiceWorker } from "./scramjet.worker.js";
|
||||
import "./scramjet.codecs.js";
|
||||
import "./scramjet.config.js";
|
||||
importScripts("scramjet.codecs.js");
|
||||
importScripts("scramjet.config.js");
|
||||
importScripts( __scramjet$config.bundle || "scramjet.bundle.js")
|
||||
importScripts( __scramjet$config.worker || "scramjet.worker.js");
|
||||
|
||||
const scramjet = new ScramjetServiceWorker();
|
||||
|
||||
|
@ -12,8 +13,4 @@ self.addEventListener("fetch", async (event) => {
|
|||
return await fetch(event.request);
|
||||
}
|
||||
})())
|
||||
});
|
||||
|
||||
self.addEventListener("message", async (message) => {
|
||||
await scramjet.messageListener(message);
|
||||
});
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue