This commit is contained in:
Nicolas Lepage 2019-11-27 11:54:51 +01:00
parent 0d506e06c8
commit c0706571bd
No known key found for this signature in database
GPG Key ID: B0879E35E66D8F6F

View File

@ -20,7 +20,13 @@
<label for="name">Name : </label><input id="name" value="World"> <label for="name">Name : </label><input id="name" value="World">
<button onclick="hello()">Hello</button> <button onclick="hello()">Hello</button>
<script> <script>
navigator.serviceWorker.register('sw.js') (async () => {
try {
await navigator.serviceWorker.register('sw.js')
} catch (e) {
console.error(e)
}
})()
</script> </script>
</body> </body>
</html> </html>