OLD | NEW |
---|---|
(Empty) | |
1 onmessage = function(e) { | |
2 if (e.data.cmd == 'GetClientId') { | |
3 fetch('clientId') | |
4 .then(function(response) { | |
5 return response.text(); | |
6 }) | |
7 .then(function(text) { | |
8 e.data.port.postMessage({clientId: text}); | |
9 }); | |
10 } | |
11 }; | |
OLD | NEW |