gecko/dom/workers/test/bug1104064_worker.js

11 lines
188 B
JavaScript

onmessage = function() {
var counter = 0;
var id = setInterval(function() {
++counter;
if (counter == 2) {
clearInterval(id);
postMessage('done');
}
}, 0);
}