tenfourfox/dom/workers/test/suspend_worker.js

14 lines
266 B
JavaScript
Raw Normal View History

2017-04-19 07:56:45 +00:00
/**
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
var counter = 0;
var interval = setInterval(function() {
postMessage(++counter);
}, 100);
onmessage = function(event) {
clearInterval(interval);
}