Skip to content

Commit

Permalink
chore: Add service-worker lifecycle event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
Esteban Lara committed Jun 1, 2019
1 parent d3cdee8 commit 4dc7a97
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripting-the-service-worker-lab/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
self.addEventListener('install', event => {
console.log('Service worker installing...');
// Add a call to skipWaiting here
});

self.addEventListener('activate', event => {
console.log('Service worker activating...');
});

0 comments on commit 4dc7a97

Please sign in to comment.