OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script> | 2 <script> |
3 fetch('clientId') | 3 fetch('clientId') |
4 .then(function(response) { | 4 .then(function(response) { |
5 return response.text(); | 5 return response.text(); |
6 }) | 6 }) |
7 .then(function(text) { | 7 .then(function(text) { |
8 parent.postMessage({clientId: text}, '*'); | 8 parent.postMessage({clientId: text}, '*'); |
9 }); | 9 }); |
| 10 |
| 11 onmessage = function(e) { |
| 12 if (e.data == 'StartWorker') { |
| 13 var w = new Worker('clients-get-client-types-frame-worker.js'); |
| 14 w.postMessage({cmd:'GetClientId', port:e.ports[0]}, [e.ports[0]]); |
| 15 } |
| 16 } |
10 </script> | 17 </script> |
OLD | NEW |