gecko-dev/dom/abort/tests/slow.sjs

12 строки
346 B
JavaScript

function handleRequest(request, response)
{
response.processAsync();
timer = Components.classes["@mozilla.org/timer;1"].
createInstance(Components.interfaces.nsITimer);
timer.init(function() {
response.write("Here the content. But slowly.");
response.finish();
}, 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
}