This commit is contained in:
sHa
2022-12-01 21:32:15 +02:00
parent 7e2c206638
commit c6ce033011

View File

@@ -1,6 +1,6 @@
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
window.addEventListener('load', function() { window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js', { scope: './' }) navigator.serviceWorker.register('sw.js', { scope: './' })
.then(function(registration) { .then(function(registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope); console.log('ServiceWorker registration successful with scope: ', registration.scope);
}) })