-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (27 loc) · 858 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
<html lang="en">
<head>
<title>Example one flexbox</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="app.css">
</head>
<body>
<main>
<section id="container">
<p>Hello world!</p>
</section>
</main>
<script src="app.js"></script>
<script>
if(navigator.serviceWorker) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('sw.js').then((reg) => {
console.log('registration ok');
}).catch((e) => {
console.log('registration fails', e);
});
});
}
</script>
</body>
</html>