tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

xhr_worker_doubleSend.js (261B)


      1 var xhr = new XMLHttpRequest();
      2 xhr.open("POST", "worker_testXHR.txt");
      3 xhr.send();
      4 try {
      5  xhr.send();
      6  postMessage("KO double send should fail");
      7 } catch (e) {
      8  postMessage(
      9    e.name === "InvalidStateError" ? "OK" : "KO InvalidStateError expected"
     10  );
     11 }