mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-29 09:32:57 +03:00
Register service worker in index.html.
This commit is contained in:
parent
42aac98497
commit
e92d9c9e9f
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user