diff --git a/docs/hello-state-keepalive/index.html b/docs/hello-state-keepalive/index.html new file mode 100644 index 0000000..f6406fb --- /dev/null +++ b/docs/hello-state-keepalive/index.html @@ -0,0 +1,28 @@ + + + + go-wasm-http-server hello with state demo + + + + + + + diff --git a/docs/hello-state-keepalive/sw.js b/docs/hello-state-keepalive/sw.js new file mode 100644 index 0000000..2c80d9e --- /dev/null +++ b/docs/hello-state-keepalive/sw.js @@ -0,0 +1,13 @@ +importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@078ff3547ebe2abfbee1fd5af9ca5ad64be480c0/sw.js') + +addEventListener('install', event => { + event.waitUntil(skipWaiting()) +}) + +addEventListener('activate', event => { + event.waitUntil(clients.claim()) +}) + +addEventListener('message', () => {}) + +registerWasmHTTPListener('../hello-state/api.wasm', { base: 'api' }) diff --git a/docs/index.html b/docs/index.html index d002845..02de08a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,6 +7,7 @@