1. I can successfully open mycode.js (created by emscripten) in my html
page and use the wasm by attaching a function to Module.onRuntimeInitialized
2. I wish to do the above activity in a web worker (instead of calling
mycode.js in script tags in my html page)
so I wrote a ww.js file and called
var w = new Worker("ww.js");
in ww.js I have this code
importScripts('mycode.js');
Module.onRuntimeInitialized = function() {
console.log('mycode module runtime Initialized');
}
*I am getting errors in the console.*
*Uncaught (in promise) RuntimeError: Aborted(CompileError:
WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44
4f @+0)*
So my question is why the mycode.js "works" from the script tags and does
not work from the web worker.
Please help me .
(You must have noticed that I am a newbie !!!)
Or point me to any example code to achieve the above.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/1c20be78-c446-4b8f-8155-ea15309dea04n%40googlegroups.com.