Created
October 4, 2018 23:30
-
-
Save goofmint/c56eac3a267e2c7a0049303681914add 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
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