-
-
Save jakearchibald/060ae42e4153837b9d9dc61e3053c975 to your computer and use it in GitHub Desktop.
This file contains 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
console.log('fetch-event.js executed'); |
This file contains 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
<!DOCTYPE html> | |
<script> | |
navigator.serviceWorker.register('sw.js'); | |
</script> |
This file contains 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
console.log('install-and-fetch.js executed'); |
This file contains 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
console.log('install-event.js executed'); |
This file contains 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
console.log('root-and-fetch.js executed'); |
This file contains 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
console.log('root.js executed'); |
This file contains 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
importScripts('root.js'); | |
importScripts('root-and-fetch.js'); | |
addEventListener('install', () => { | |
importScripts('install-event.js'); | |
importScripts('install-and-fetch.js'); | |
}); | |
addEventListener('fetch', () => { | |
importScripts('root-and-fetch.js'); | |
importScripts('install-and-fetch.js'); | |
importScripts('fetch-event.js'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment