Open Perter-Zhang opened 5 days ago
I don't see anything immediately wrong with the example, but I do notice your output for emcc -v
shows emscripten 3.1.25
which is very old. Maybe try a more recent version/ensure you're actually building with 3.1.69 like you mention.
I am currently simulating a modal dialog.
In CPP code,I will create a H5
When click "close" button, the dialog will be close and continue subsequent follow.
To achieve the blocking effect, I used the macro EM_ASYNC_JS to implement it.
In EM_ASYNC_JS Function, I will create a Promise and listen "close" event for dialog element. If the "close" event be triggered, The function will return a result.
But when actually executing, The close event is triggered but it will not be returned to CPP
Version of emscripten/emsdk: 3.1.69
Full link command and output with
-v
appended: emcc example.cpp exampleexport.cpp -o a.js -g -s ASYNCIFY --bindAfter check the output result, I found it will output warning and error in terminal. The output result as following:
If I not use embind to bind event listeners for "close" button
The result is right. The output result as following:
Does anyone have any idea about this issue? If I use embind to bind events, how do I adjust my EM_ASYNC_JS function?
I am a beginner in emscripten and may not know much about it. If there is anything wrong in my description, please forgive me.