-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (26 loc) · 881 Bytes
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Boilerplate</title>
<script src="build/index.js" charset="utf-8"></script>
<script>
SteveJobsWorker.init();
</script>
</head>
<body>
Code here.
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js').then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
</body>
</html>