It wasn’t very easy in the case of my app. The requirement to change the main loop into an externally-callable function, with emscripten_set_main_loop(), involved a fair amount of code re-factoring. My app being multi-threaded also added complications.
Fortunately Emscripten/WebAssembly does now support multi-threading, but last time I checked (and that was back at SDL 2.0.10) the integration with SDL wasn’t working and I had to work around that. Hopefully the latest version of SDL2 now fully supports multi-threading with Emscripten, but I’d like that to be confirmed by somebody.