2021-04-23 18:58:51 -04:00
|
|
|
// Start the service worker, if you can
|
2018-11-07 14:29:21 -05:00
|
|
|
if ('serviceWorker' in navigator) {
|
2018-08-20 16:24:33 -04:00
|
|
|
navigator.serviceWorker.register('/sw.js').then(reg => {
|
|
|
|
console.log('Service worker registered', reg.scope);
|
|
|
|
}).catch(error => {
|
|
|
|
console.error('Failed to register service worker', error);
|
|
|
|
});
|
2021-04-23 18:58:51 -04:00
|
|
|
}
|