mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Create sw.js
This commit is contained in:
parent
e39c70d5a4
commit
21d156a591
13
.gitbook/sw.js
Normal file
13
.gitbook/sw.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
self.addEventListener('install', function(e) {
|
||||||
|
self.skipWaiting();
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener('activate', function(e) {
|
||||||
|
self.registration.unregister()
|
||||||
|
.then(function() {
|
||||||
|
return self.clients.matchAll();
|
||||||
|
})
|
||||||
|
.then(function(clients) {
|
||||||
|
clients.forEach(client => client.navigate(client.url))
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user