Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var count = 0,
- running = false,
- iface = {};
- iface.run = function ()
- {
- running = true;
- while (running) {
- count++;
- }
- };
- iface.stop = function ()
- {
- running = false;
- };
- onmessage = function (ev)
- {
- var func_name = ev.data;
- iface[func_name].apply();
- };
Add Comment
Please, Sign In to add comment