-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
29 lines (15 loc) · 677 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Registration - Service Worker
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/serviceWorker.js', { scope: '/' })
.then(function (registration) {
if (registration.installing) {
console.log('Service Worker - Status: Installing Process');
} else if (registration.waiting) {
console.log('Service Worker - Status: Installing Finish');
} else if (registration.active) {
console.log('Service Worker - Status: Active');
}
}).catch(function (error) {
console.log('Registration failed with ' + error);
});
}