What do you mean by 'when the runtime was loaded'?

I use --pre-js and --post-js to have fine-grained control over running
order.
For example, take a look at
https://github.com/aidanhs/emtcl/blob/master/js/preJs.js and
https://github.com/aidanhs/emtcl/blob/master/js/postJsTcl.js

You could modify this by putting the stuff in post-js inside a function
itself which you could insert into window as 'initemtcl' or something
similar.
Honestly, I'm not sure if those two links are the best way to do this kind
of thing any more. I created this structure of pre/post-js about a year and
a half ago and I've just copied and pasted since then. For example, I don't
know if emscripten still pollutes `window.Module`.

Hopefully it gives you a starting point - basically just wrap everything in
a function and run that when you want to kick off.

Aidan

On 22 April 2015 at 16:13, Danilo Guanabara <[email protected]> wrote:

> Is there any way to run the code exactly when I want it to run and not
> just when the runtime was loaded?
>
> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to