summaryrefslogtreecommitdiffstats
path: root/dom/xhr/tests/worker_xhr_cors_redirect.js
blob: c006b4a2ed389dbc08feb742906528cc5cc6be42 (plain)
1
2
3
4
5
6
7
8
9
10
onmessage = function(e) {
  var xhr = new XMLHttpRequest();
  xhr.open('GET', e.data, true);
  xhr.onreadystatechange = function () {
    if (xhr.readyState === 4) {
      postMessage(xhr.status);
    }
  };
  xhr.send();
};