sw
This commit is contained in:
@@ -17,5 +17,14 @@
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
||||
// Check that service workers are registered
|
||||
if ('serviceWorker' in navigator) {
|
||||
// Use the window load event to keep the page load performant
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('./service.worker.js');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="./index.js"></script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user