From 79db7567a53dac7a443040fac5eda90a492e6809 Mon Sep 17 00:00:00 2001 From: Nicolas Lepage <19571875+nlepage@users.noreply.github.com> Date: Sun, 24 Jan 2021 21:52:41 +0100 Subject: [PATCH] :construction: --- docs/hello-state-keepalive/index.html | 28 +++++++++++++++++++++++++++ docs/hello-state-keepalive/sw.js | 13 +++++++++++++ docs/index.html | 1 + 3 files changed, 42 insertions(+) create mode 100644 docs/hello-state-keepalive/index.html create mode 100644 docs/hello-state-keepalive/sw.js 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 @@