diff options
Diffstat (limited to 'src/proxyClient.js')
-rw-r--r-- | src/proxyClient.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/proxyClient.js b/src/proxyClient.js index 645ccca6..e3e2dfea 100644 --- a/src/proxyClient.js +++ b/src/proxyClient.js @@ -3,3 +3,14 @@ var worker = new Worker('{{{ filename }}}.js'); +worker.onmessage = function(event) { + var data = event.data; + switch (data.target) { + case 'window': { + window[data.method](); + break; + } + default: throw 'what?'; + } +}; + |