Register service worker with root scope
This commit is contained in:
parent
3a94e603d3
commit
717ddb3884
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
let socket: WebSocket | null = null;
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/static/js/sw.js')
|
||||
navigator.serviceWorker.register('/static/js/sw.js', { 'scope': '/' })
|
||||
.then(function (registration) {
|
||||
console.log('Registration successful, scope is:', registration.scope);
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue