feature: activate sw
This commit is contained in:
parent
354807c512
commit
1d1f8de324
@ -1,11 +1,11 @@
|
|||||||
// if('serviceWorker' in navigator) {
|
if('serviceWorker' in navigator) {
|
||||||
// var refreshing;
|
var refreshing;
|
||||||
// navigator.serviceWorker.addEventListener('controllerchange', () => {
|
navigator.serviceWorker.addEventListener('controllerchange', () => {
|
||||||
// if (refreshing) {
|
if (refreshing) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// refreshing = true;
|
refreshing = true;
|
||||||
// window.location.reload();
|
window.location.reload();
|
||||||
// });
|
});
|
||||||
// navigator.serviceWorker.register('/sw.js');
|
navigator.serviceWorker.register('/sw.js');
|
||||||
// }
|
}
|
Loading…
Reference in New Issue
Block a user