Created
July 2, 2018 09:26
-
-
Save goofmint/e7a2bfac9cf98c54b46ca057954c5439 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
self.addEventListener('install', () => { | |
console.log('ServiceWorker がインストールされました'); | |
}); | |
self.addEventListener('push', ev => { | |
self.registration.showNotification('メッセージが届きました', { | |
body: '新しいメッセージです' | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment