blob: 117f25477b0269bf36e470bd7acd35ba1ae9204b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<html>
<head>
<script>
window.addEventListener('message', async function(evt) {
if (evt.data === 'START') {
var w = window.open('./');
var sw = w.navigator.serviceWorker;
w.close();
w = null;
try {
await sw.register('doesntmatter.js');
} finally {
parent.postMessage('OK', '*');
}
}
});
</script>
</head>
</html>
|