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