diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/proxyClient.js | 2 | ||||
-rw-r--r-- | src/proxyWorker.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/proxyClient.js b/src/proxyClient.js index 45915eaa..bcdf7166 100644 --- a/src/proxyClient.js +++ b/src/proxyClient.js @@ -54,7 +54,7 @@ worker.onmessage = function worker_onmessage(event) { case 'canvas': { switch (data.op) { case 'getContext': { - Module.ctx = Module.canvas.getContext(data.type); + Module.ctx = Module.canvas.getContext(data.type, data.attributes); if (data.type !== '2d') Module.glClient = new WebGLClient(); break; } diff --git a/src/proxyWorker.js b/src/proxyWorker.js index 820f0a34..dd572dad 100644 --- a/src/proxyWorker.js +++ b/src/proxyWorker.js @@ -56,8 +56,8 @@ document.createElement = function document_createElement(what) { postMessage({ target: 'canvas', op: 'resize', width: canvas.width, height: canvas.height }); } }; - canvas.getContext = function canvas_getContext(type) { - postMessage({ target: 'canvas', op: 'getContext', type: type }); + canvas.getContext = function canvas_getContext(type, attributes) { + postMessage({ target: 'canvas', op: 'getContext', type: type, attributes: attributes }); if (type === '2d') { return { getImageData: function(x, y, w, h) { |