mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
⚗️
This commit is contained in:
parent
d38dff8675
commit
9c7fa207ff
8
index.js
8
index.js
@ -1,3 +1,7 @@
|
||||
addEventListener('activate', event => {
|
||||
event.waitUntil(clients.claim())
|
||||
})
|
||||
|
||||
let nextHandlerId = 1
|
||||
const handlerResolvers = {}
|
||||
|
||||
@ -28,10 +32,6 @@ self.wasmhttp = {
|
||||
try {
|
||||
if (!wasm) throw TypeError('options.wasm must be defined')
|
||||
|
||||
addEventListener('activate', event => {
|
||||
event.waitUntil(clients.claim())
|
||||
})
|
||||
|
||||
const handlerId = `${nextHandlerId++}`
|
||||
const handler = new Promise(resolve => handlerResolvers[handlerId] = resolve)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user