summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/service-workers/service-worker/resources/clients-get-client-types-shared-worker.js
blob: fadef970374bdb872062b28bcb5d1fd249ed2066 (plain)
1
2
3
4
5
6
7
8
9
10
onconnect = function(e) {
  var port = e.ports[0];
  fetch('clientId')
    .then(function(response) {
        return response.text();
      })
    .then(function(text) {
        port.postMessage({clientId: text});
      });
};