OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
2 <title>register</title> | |
3 <script src="test-helpers.js"></script> | |
4 <body> | |
5 <script> | |
6 navigator.serviceWorker.register('empty-worker.js', {scope: 'scope-register'}) | |
7 .then( | |
8 registration => { | |
9 registration.unregister().then(() => { | |
10 window.parent.postMessage('OK', '*'); | |
11 }); | |
12 }, | |
13 error => { | |
14 window.parent.postMessage('FAIL: ' + error.name, '*'); | |
15 }) | |
16 .catch(error => { | |
17 window.parent.postMessage('ERROR: ' + error.name, '*'); | |
18 }); | |
19 </script> | |
20 </body> | |
OLD | NEW |