about summary refs log tree commit diff
path: root/app/javascript/themes/glitch/service_worker/entry.js
blob: eea4cfc3c2f82b735f2cf6c20e79da0ca1d15afc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import './web_push_notifications';

// Cause a new version of a registered Service Worker to replace an existing one
// that is already installed, and replace the currently active worker on open pages.
self.addEventListener('install', function(event) {
  event.waitUntil(self.skipWaiting());
});
self.addEventListener('activate', function(event) {
  event.waitUntil(self.clients.claim());
});