OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="get-host-info.sub.js"></script> | 2 <script src="/common/get-host-info.sub.js"></script> |
3 <script src="test-helpers.sub.js"></script> | 3 <script src="test-helpers.sub.js"></script> |
4 <script> | 4 <script> |
5 var host_info = get_host_info(); | 5 var host_info = get_host_info(); |
6 var SCOPE = 'navigation-redirect-scope1.py'; | 6 var SCOPE = 'navigation-redirect-scope1.py'; |
7 var SCRIPT = 'navigation-redirect-worker.js'; | 7 var SCRIPT = 'navigation-redirect-worker.js'; |
8 | 8 |
9 var registration; | 9 var registration; |
10 var worker; | 10 var worker; |
11 var wait_for_worker_promise = navigator.serviceWorker.getRegistration(SCOPE) | 11 var wait_for_worker_promise = navigator.serviceWorker.getRegistration(SCOPE) |
12 .then(function(reg) { | 12 .then(function(reg) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 }); | 57 }); |
58 } else if (e.data.message == 'unregister') { | 58 } else if (e.data.message == 'unregister') { |
59 registration.unregister() | 59 registration.unregister() |
60 .then(function() { | 60 .then(function() { |
61 send_result(e.data.id, 'ok'); | 61 send_result(e.data.id, 'ok'); |
62 }); | 62 }); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 </script> | 66 </script> |
OLD | NEW |