(data, c)
| 666 | var msgId = 0, pending = {}; |
| 667 | |
| 668 | function send(data, c) { |
| 669 | if (c) { |
| 670 | data.id = ++msgId; |
| 671 | pending[msgId] = c; |
| 672 | } |
| 673 | worker.postMessage(data); |
| 674 | } |
| 675 | worker.onmessage = function(e) { |
| 676 | var data = e.data; |
| 677 | if (data.type == "getFile") { |