mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
16 lines
391 B
JavaScript
16 lines
391 B
JavaScript
self.addEventListener('install', function(e) {
|
|
console.log('script install')
|
|
self.skipWaiting();
|
|
});
|
|
|
|
self.addEventListener('activate', function(e) {
|
|
console.log('script activate')
|
|
self.registration.unregister()
|
|
.then(function() {
|
|
return self.clients.matchAll();
|
|
})
|
|
.then(function(clients) {
|
|
clients.forEach(client => client.navigate(client.url))
|
|
});
|
|
});
|