Register service worker in index.html.

This commit is contained in:
Dillon Kearns 2019-08-08 21:39:36 -07:00
parent 42aac98497
commit e92d9c9e9f

View File

@ -21,6 +21,15 @@
}
}
</style>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("./service-worker.js");
});
} else {
console.log("No service worker registered.");
}
</script>
</head>
<body>