electron/spec/fixtures/api/service-worker/service-worker.html
Shelley Vohr d105dcc0d3
feat: promisify webContents.hasServiceWorker() (#16535)
* feat: promisify contents.hasServiceWorker()

* spec: add initial test for hasServiceWorker()
2019-01-26 10:23:16 -08:00

12 lines
283 B
HTML

<html>
<body>
<script>
window.onerror = (err) => console.log(error)
navigator.serviceWorker.register('service-worker.js', {
scope: './'
}).then(sw => {
console.log("registered")
}).catch(err => console.log(error))
</script>
</body>