Skip to content

Commit

Permalink
chore: upgrades to go-wasm-http-server latest
Browse files Browse the repository at this point in the history
  • Loading branch information
nlepage committed Dec 11, 2024
1 parent 6599c21 commit 172b1d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Binary file modified docs/wasm/catption.wasm
Binary file not shown.
8 changes: 5 additions & 3 deletions docs/wasm/sw.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.23.1/misc/wasm/wasm_exec.js')
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v2.0.1/sw.js')
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v2.0.5/sw.js')

const wasm = 'catption.wasm'

addEventListener('install', (event) => {
event.waitUntil(skipWaiting())
event.waitUntil(caches.open('catption').then((cache) => cache.add(wasm)))
})

addEventListener('activate', event => {
event.waitUntil(clients.claim())
})

registerWasmHTTPListener('catption.wasm', { args: ['http'] })
registerWasmHTTPListener(wasm, { args: ['http'] })

0 comments on commit 172b1d8

Please sign in to comment.