blob: e024972737c2b271e90e61cd600a5796ae725866 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/**
* 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);
};
|