mirror of https://git.tuxpa.in/a/code-server.git
register service worker at relative scope
Co-Authored-By: Ian Reinhart Geiser <geiseri@geekcentral.pub>
This commit is contained in:
parent
a2ad3d4ff4
commit
46207cfe10
|
@ -29,7 +29,7 @@
|
||||||
if ("serviceWorker" in navigator) {
|
if ("serviceWorker" in navigator) {
|
||||||
// Use the window load event to keep the page load performant
|
// Use the window load event to keep the page load performant
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
navigator.serviceWorker.register("/service-worker.js");
|
navigator.serviceWorker.register('service-worker.js', {scope: './'});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue