Guide_Wii/images/pwa.js

11 lines
332 B
JavaScript
Raw Normal View History

document.addEventListener('DOMContentLoaded', init, false);
function init() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/images/service-worker.js')
.then((reg) => {
// Service worker registration confirmed
}, (err) => {
// Service worker registration error
});
}
}