Skip to content

Instantly share code, notes, and snippets.



Created Oct 4, 2018
What would you like to do?
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').then(function(registration) {
// Service Worker登録完了
}, /*catch*/ function(error) {
// Service Worker登録失敗
} else {
// Service Workerをサポートしていない
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment