Oberflächenadministratoren, SMW-Administratoren, SMW-Kuratoren, SMW-Editoren, Oversighter, Administratoren, Widget-Bearbeiter
1.219
Bearbeitungen
(register serviceworker) Markierungen: Mobile Bearbeitung Mobile Web-Bearbeitung |
KKeine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
if ('serviceWorker' in navigator) { | if ('serviceWorker' in navigator) { | ||
window.addEventListener('load', function() { | window.addEventListener('load', function() { | ||
navigator.serviceWorker.register(' | navigator.serviceWorker.register('/wiki/serviceworker.js').then(function(registration) { | ||
// Registration was successful | // Registration was successful | ||
console.log('ServiceWorker registration successful with scope: ', registration.scope); | console.log('ServiceWorker registration successful with scope: ', registration.scope); |
Bearbeitungen