2018-01-29 12:23:31 -05:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
});
|