aboutsummaryrefslogtreecommitdiff
path: root/src/proxyClient.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-08 15:39:38 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-08 15:39:38 -0700
commit4b23f881076704b5279657d43f4f599a15de9750 (patch)
tree223280ef46f1a088d7eb1ae0edf5332c19d4945b /src/proxyClient.js
parent1a7cf7ee13d06ea3c95818fe7d3262e155e4e61d (diff)
proxy window.close
Diffstat (limited to 'src/proxyClient.js')
-rw-r--r--src/proxyClient.js11
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?';
+ }
+};
+