tor-browser

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

sync_xhr_unload.sjs (440B)


      1 var timer = null;
      2 
      3 function handleRequest(request, response) {
      4   response.processAsync();
      5   timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
      6   timer.initWithCallback(
      7     function () {
      8       response.setStatusLine(null, 200, "OK");
      9       response.setHeader("Content-Type", "text/plain", false);
     10       response.write("hello");
     11       response.finish();
     12     },
     13     30000 /* milliseconds */,
     14     Ci.nsITimer.TYPE_ONE_SHOT
     15   );
     16 }