mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-06 06:28:27 +00:00
Claim clients to avoid the refresh
This commit is contained in:
@@ -47,6 +47,9 @@ self.addEventListener('activate', function(event) {
|
|||||||
const go = new Go()
|
const go = new Go()
|
||||||
WebAssembly.instantiateStreaming(fetch(`${bundle_path}/../../dendrite.wasm`), go.importObject).then((result) => {
|
WebAssembly.instantiateStreaming(fetch(`${bundle_path}/../../dendrite.wasm`), go.importObject).then((result) => {
|
||||||
go.run(result.instance)
|
go.run(result.instance)
|
||||||
|
// make fetch calls go through this sw - notably if a page registers a sw, it does NOT go through any sw by default
|
||||||
|
// unless you refresh or call this function.
|
||||||
|
self.clients.claim()
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user