<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
// Demonstrates how the navigator.serviceWorker api can be used | |
const serviceWorker = navigator.serviceWorker; | |
serviceWorker.register().then(registration => { | |
console.log("success!"); | |
}, err => { | |
console.error("Installing the worker failed!", err); | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |