summaryrefslogtreecommitdiff
path: root/src/scripts/main.js
blob: e4efee008c2d1f089b8004ba7bf72e97666e688d (plain)
1
2
3
4
5
6
7
8
9
if ("serviceWorker" in navigator) {
    window.addEventListener("load", function () {

        navigator.serviceWorker
            .register("scripts/service-worker.js")
            .then(res => console.log("service worker registered"))
            .catch(err => console.log("service worker not registered", err))
    })
}