2022-07-15 16:49:36 +02:00
|
|
|
document.addEventListener('DOMContentLoaded', init, false);
|
|
|
|
function init() {
|
|
|
|
if ('serviceWorker' in navigator) {
|
2023-10-01 06:46:40 +02:00
|
|
|
navigator.serviceWorker.register('/assets/js/service-worker.js')
|
2022-07-15 16:49:36 +02:00
|
|
|
.then((reg) => {
|
|
|
|
// Service worker registration confirmed
|
|
|
|
}, (err) => {
|
|
|
|
// Service worker registration error
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|