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
c1fcadf0f8
commit
574bb8928c
@ -3,7 +3,15 @@
|
||||
<head>
|
||||
<title>go-wasm-http-server demo</title>
|
||||
<script>
|
||||
navigator.serviceWorker.register('sw.js')
|
||||
navigator.serviceWorker.register('sw.js').then(reg => {
|
||||
if(reg.installing) {
|
||||
console.log('Service worker installing')
|
||||
} else if(reg.waiting) {
|
||||
console.log('Service worker installed')
|
||||
} else if(reg.active) {
|
||||
console.log('Service worker active')
|
||||
}
|
||||
})
|
||||
|
||||
async function hello() {
|
||||
res = await fetch('api/hello', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user