-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
24 lines (24 loc) · 789 Bytes
/
index.html
File metadata and controls
24 lines (24 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<title>PWA test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=360,initial-scale=1">
<link rel="manifest" href="manifest.json">
<meta name="application-name" content="Sample" />
</head>
<body>
<script>
if ( 'serviceWorker' in navigator ) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('serviceworker.js').then(function(registration) {
console.log( 'ServiceWorker registration successful. Scope: ' + registration.scope )
}).catch(function(err) {
console.log( 'ServiceWorker registration failed. Error: ' + err);
});
});
}
</script>
<textarea id="textarea">test</textarea >
</body>
</html>