Commit 3ac81fc3 authored by chriseth's avatar chriseth

Merge pull request #98 from chriseth/fixWorker

Fix worker implementation.
parents b861e45c 7e96901b
var version = function() { return '(loading)'; } var version = function() { return '(loading)'; }
var compileJSON = function() { return ''; } var compileJSON = function() { return ''; }
var missingInputs = [];
addEventListener('message', function(e) { addEventListener('message', function(e) {
var data = e.data; var data = e.data;
var missingInputs = [];
switch (data.cmd) { switch (data.cmd) {
case 'loadVersion': case 'loadVersion':
delete Module; delete Module;
...@@ -32,7 +32,7 @@ addEventListener('message', function(e) { ...@@ -32,7 +32,7 @@ addEventListener('message', function(e) {
}); });
break; break;
case 'compile': case 'compile':
missingInputs missingInputs.length = 0;
postMessage({cmd: 'compiled', data: compileJSON(data.source, data.optimize)}, missingInputs: missingInputs); postMessage({cmd: 'compiled', data: compileJSON(data.source, data.optimize)}, missingInputs: missingInputs);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment