wasm: fix specialHtmlTargets code

Remove .as_handle() call, which was left over from the previous
EM_ASM-based code; see 0ec75f4b9.

Change-Id: I220304074f4d17e706726dab086c0330edc9ef25
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
Morten Sørvig 2022-05-12 15:41:25 +02:00 committed by Morten Johan Sørvig
parent f4e9981259
commit 250f5f4a11

View File

@ -105,9 +105,8 @@ QWasmScreen::QWasmScreen(const emscripten::val &containerOrCanvas)
// As a workaround for this, Emscripten supports registering custom mappings in the // As a workaround for this, Emscripten supports registering custom mappings in the
// "specialHTMLTargets" object. Add a mapping for the canvas for this screen. // "specialHTMLTargets" object. Add a mapping for the canvas for this screen.
emscripten::val specialHtmlTargets = emscripten::val::module_property("specialHTMLTargets"); emscripten::val specialHtmlTargets = emscripten::val::module_property("specialHTMLTargets");
std::string id = std::string("!qtcanvas_") + std::to_string(uint32_t(this)); std::string id = std::string("!qtcanvas_") + std::to_string(uint32_t(this));
specialHtmlTargets.set(id, m_canvas.as_handle()); specialHtmlTargets.set(id, m_canvas);
// Install event handlers on the container/canvas. This must be // Install event handlers on the container/canvas. This must be
// done after the canvas has been created above. // done after the canvas has been created above.