0
0
Fork 0

feat(push-notifications): Open link in current tab if possible (#4228)

* fix(push-notification): Open link in current tab if possible

* feat(sw): Skip waiting and claim clients
This commit is contained in:
Sorin Davidoi 2017-07-18 00:19:17 +02:00 committed by Eugen Rochko
parent b11ac88692
commit 719ab720a7
2 changed files with 28 additions and 1 deletions

View file

@ -1 +1,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());
});