summaryrefslogtreecommitdiffstats
path: root/dom/abort/tests/slow.sjs
blob: 33a9c76b8165abc098ebd0d23999fdb67b56b945 (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();
    },
    1000,
    Ci.nsITimer.TYPE_ONE_SHOT
  );
}