2021-08-11 10:01:56 +02:00
|
|
|
let CACHE_NAME = 'workavdenture-cache-dev';
|
2021-08-10 22:34:46 +02:00
|
|
|
let urlsToCache = [
|
|
|
|
'/'
|
|
|
|
];
|
|
|
|
|
|
|
|
self.addEventListener('install', function(event) {
|
|
|
|
// Perform install steps
|
|
|
|
event.waitUntil(
|
|
|
|
caches.open(CACHE_NAME)
|
|
|
|
.then((cache) => {
|
|
|
|
return cache.addAll(urlsToCache);
|
|
|
|
})
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
self.addEventListener('fetch', (event) => {
|
2021-08-11 10:01:56 +02:00
|
|
|
//never cache data will be stored in dev mode
|
2021-08-10 22:34:46 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
self.addEventListener('wait', function(event) {
|
|
|
|
//TODO wait
|
|
|
|
});
|
|
|
|
|
|
|
|
self.addEventListener('update', function(event) {
|
|
|
|
//TODO update
|
|
|
|
});
|
|
|
|
|
|
|
|
self.addEventListener('beforeinstallprompt', (e) => {
|
|
|
|
//TODO change prompt
|
|
|
|
});
|