Created
October 28, 2019 14:47
-
-
Save thepassle/df1ebe859bc429d6362ec18880fafc9b to your computer and use it in GitHub Desktop.
clientsclaim7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.addEventListener('install', event => { | |
// cache a cat SVG | |
event.waitUntil( | |
caches.open('static-v1') | |
.then(cache => cache.add('cat.svg')) | |
); | |
}); | |
self.addEventListener('activate', event => { | |
clients.claim(); | |
console.log('Now controlling the page!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment