2018-01-29 12:23:31 -05:00
|
|
|
/**
|
|
|
|
* @license
|
2020-05-19 15:08:49 -04:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2018-01-29 12:23:31 -05:00
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
|
|
|
// tslint:disable:no-console
|
|
|
|
|
2020-04-13 19:40:21 -04:00
|
|
|
self.addEventListener('install', event => {
|
|
|
|
self.skipWaiting();
|
|
|
|
});
|
2018-01-29 12:23:31 -05:00
|
|
|
|
|
|
|
self.addEventListener('activate', event => {
|
|
|
|
event.waitUntil(self.clients.claim());
|
2020-04-13 19:40:21 -04:00
|
|
|
self.registration.unregister().then(() => {
|
|
|
|
console.log('NGSW Safety Worker - unregistered old service worker');
|
|
|
|
});
|
2018-01-29 12:23:31 -05:00
|
|
|
});
|