aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-12 14:22:04 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-12 14:22:04 -0700
commit3b606eaa60f487aa8afe2ca46137c43f27f10d5a (patch)
treeab3e58e5c1e64af11693ade72c4a633499d0ba8c
parentfcad6370120519b60fa3f6f30b64fe46ae9203d2 (diff)
proxy window resizes
-rw-r--r--src/proxyWorker.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/proxyWorker.js b/src/proxyWorker.js
index a844eac8..820f0a34 100644
--- a/src/proxyWorker.js
+++ b/src/proxyWorker.js
@@ -119,6 +119,12 @@ Module.printErr = function Module_printErr(x) {
postMessage({ target: 'stderr', content: x });
};
+// Browser hooks
+
+Browser.resizeListeners.push(function(width, height) {
+ postMessage({ target: 'canvas', op: 'resize', width: width, height: height });
+});
+
// buffer messages until the program starts to run
var messageBuffer = null;