mirror of
https://github.com/MaciejkaG/statki.git
synced 2024-11-30 11:42:55 +01:00
8 lines
309 B
JavaScript
8 lines
309 B
JavaScript
if ("serviceWorker" in navigator) {
|
|
window.addEventListener("load", () => {
|
|
navigator.serviceWorker
|
|
.register("/serviceWorker.js")
|
|
.then(res => console.log("Service worker registered"))
|
|
.catch(err => console.log("Service worker not registered", err));
|
|
});
|
|
} |