summaryrefslogtreecommitdiffstats
path: root/dom/xhr/tests/slow.sjs
blob: 0d0308f6e7c2ca301e16f89d03f3fa0c51f5050f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function handleRequest(request, response) {
  response.processAsync();

  let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
  timer.init(
    function () {
      response.write("Here the content. But slowly.");
      response.finish();
    },
    5000,
    Ci.nsITimer.TYPE_ONE_SHOT
  );
}