Hi All,
I'm experimenting with a relatively tricky scenario:
or its github source:
It works fine with normal html+js pages but I decided to do the same with a qt/qml app compiled as webassembly. Seems to work till the point when the EM_ASM block gets called where the global (window) onmessage function gets registered:
EM_ASM(
var port;
onmessage=function(e){
port=e.port[0]
}
);
That onmessage gets called from java via webview postWebMessage(...) fine but it seems that the parameter that is passed into postWebMessage(...) goes through a JSON.parse and what I get in the incoming 'e' event is just an:
{isTrusted: true}
So the function fails with not being able to access property 0 of undefined.
Does anyone know why the event object does not arrive as expected?
Thanks®ards,
r0ller