mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b0c6119cf2
--HG-- extra : rebase_source : cd5a5bca0964294fd74ab70123e805c4e0f9deac
16 lines
501 B
JavaScript
16 lines
501 B
JavaScript
function handleRequest(request, response)
|
|
{
|
|
response.processAsync();
|
|
response.setHeader("Content-Type", "text/plain", false);
|
|
|
|
for (var i = 0; i < 1000; ++i)
|
|
response.write("Hello... ");
|
|
|
|
var timer = Components.classes["@mozilla.org/timer;1"]
|
|
.createInstance(Components.interfaces.nsITimer);
|
|
timer.initWithCallback(function() {
|
|
response.write("world.\n");
|
|
response.finish();
|
|
}, 10 * 1000 /* 10 secs */, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
|
}
|