diff options
| author | Alexandra Cherdantseva <[email protected]> | 2019-12-30 14:40:03 +0300 | 
|---|---|---|
| committer | Alexandra Cherdantseva <[email protected]> | 2020-01-13 11:07:21 +0300 | 
| commit | 18e06c37e10943f4b4f6d57b7044b9bce3a23202 (patch) | |
| tree | 6d648b6b185025e1bee930e2cd0f3de4a74b85c8 /src/plugins/platforms/wasm/qwasmopenglcontext.cpp | |
| parent | 3d1e257770e8c79c7cd9a08f9caf1bd8395cb10c (diff) | |
wasm: do not get canvas as property of js global object
You cannot be sure that property with specified key in
a global object is really a canvas.
Should use `document.getElementById`.
Change-Id: Ife55adaad5517aed64122b0c9bff32489cf19a2f
Reviewed-by: Lorn Potter <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmopenglcontext.cpp')
| -rw-r--r-- | src/plugins/platforms/wasm/qwasmopenglcontext.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/plugins/platforms/wasm/qwasmopenglcontext.cpp b/src/plugins/platforms/wasm/qwasmopenglcontext.cpp index 0532b7e7262..501ab99116a 100644 --- a/src/plugins/platforms/wasm/qwasmopenglcontext.cpp +++ b/src/plugins/platforms/wasm/qwasmopenglcontext.cpp @@ -106,7 +106,7 @@ EMSCRIPTEN_WEBGL_CONTEXT_HANDLE QWasmOpenGLContext::createEmscriptenContext(cons      attributes.depth = useDepthStencil;      attributes.stencil = useDepthStencil; -    EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context = emscripten_webgl_create_context(canvasId.toLocal8Bit().constData(), &attributes); +    EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context = emscripten_webgl_create_context(canvasId.toUtf8().constData(), &attributes);      return context;  } | 
