https://github.com/angular/angular
Raw File
Tip revision: 64d94e8a6805c98d40b2763cbd6f6f1d8e1fd270 authored by Andrew Scott on 07 January 2021, 20:29:20 UTC
release: cut the v11.0.7 release (#40343)
Tip revision: 64d94e8
safety-worker.js
/**
 * @license
 * Copyright Google LLC 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

self.addEventListener('install', event => {
  self.skipWaiting();
});

self.addEventListener('activate', event => {
  event.waitUntil(self.clients.claim());
  self.registration.unregister().then(() => {
    console.log('NGSW Safety Worker - unregistered old service worker');
  });
});
back to top