UNPKG

519 BJavaScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8
9// tslint:disable:no-console
10
11self.addEventListener('install', event => {
12 self.skipWaiting();
13});
14
15self.addEventListener('activate', event => {
16 event.waitUntil(self.clients.claim());
17 self.registration.unregister().then(() => {
18 console.log('NGSW Safety Worker - unregistered old service worker');
19 });
20});