Thanks for your reply!
But if I clear `noExitRuntime`, then exiting `main()` will shut down the runtime as well?
I tried at init:
- set`noExitRuntime=0` and `noInitialRun=1`
- move the body of my `main()` into an init function and let `main()` have an empty body
- invoke my init function at end of `postRun`
Then the main-loop runs in javascript.
And then when shutting down:
- run `callMain()`
This appears to work as I want, application seems to get events and rendering works, and event handlers seem to be cleaned up when shutting down.
Thanks,
Christopher