Trouble using Asyncify
Unsolved
Qt for WebAssembly
-
Hello, I am trying to create a project using Qt for Webassembly, and in trying to learn how to make calls to JavaScript libraries, I started from an example I found online which is the following snippet of code:
EM_ASYNC_JS(emscripten::EM_VAL, fetch_json, (const char *url), { url = UTF8ToString(url); let response = await fetch(url); let json = await response.json(); return Emval.toHandle(json); });
Calling this function in a project compiles fine, but yields the following result, suggesting to me that the error is in the JavaScript itself.
What does it mean that Asyncify is undefined? How may I best make calls like this from Qt?
Thank you -
Did you configure Qt with -device-option QT_EMSCRIPTEN_ASYNCIFY=1 ?