<html>
<title>create service worker</title>
<script>
async function register(worker_url, scope) {
try {
const init = scope ? {scope} : {};
await navigator.serviceWorker.register(worker_url, init);
await navigator.serviceWorker.ready;
return 'DONE';
} catch (error) {
return `${error}`;
}
}
</script>
</html>