Initial proof of concept
This commit is contained in:
parent
b80602e230
commit
85e9e1f5f1
8 changed files with 101 additions and 0 deletions
29
index.html
Normal file
29
index.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>LIPS PWA</title>
|
||||
<link rel="manifest" href="/manifest.json"/>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Load the scheme interpreter -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/lips@beta/dist/lips.min.js" bootstrap></script>
|
||||
<!-- Mithril -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mithril/2.2.2/mithril.min.js"></script>
|
||||
<!-- Load the application code -->
|
||||
<script type="text/x-scheme" src="/app.scm"></script>
|
||||
<!-- Load the service worker -->
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('/sw.js').then(function(registration) {
|
||||
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
}, function(err) {
|
||||
console.log('ServiceWorker registration failed: ', err);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue