mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
start intercepting workers
This commit is contained in:
parent
9c4f157dd8
commit
25f3fd7316
3 changed files with 8 additions and 1 deletions
7
src/client/worker.ts
Normal file
7
src/client/worker.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { encodeUrl } from "../bundle";
|
||||
const RealWorker = Worker
|
||||
Worker = new Proxy(Worker, {
|
||||
construct(_target, args) {
|
||||
return new RealWorker(encodeUrl(args[0]), args[1])
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue