It was a lot of work, first I made a fork of SFML which uses OpenGL ES 2 to be able to use shaders on mobile platforms (but also WebGL requires at least OpenGL ES 2) and then I made a fork that can work with Emscripten. The Emscripten fork was done relatively quick since there were already 2 forks out there (for SFML 2.2 and custom 3) so most of the Emscripten code is shared with those. I've made a video on this if you'd like a bit more info:
Did take a look at the video, but wasn't exactly sure how'd Id approach mine with it. As far as I remember Emscripten its documentation used to be weird as well as most of the code had to be rewritten to support it. My project itself uses SFML for the Input and Window which could be replaced by SDL in theory, but just enjoy the simplicity of SFML to be honest.
Will see maybe ill figure it out, thanks!
If you want to I made a resource page or place or sorts where I add weird information like that, that most often is not like searched for or answered here https://github.com/VerzatileDevOrg/Programming_HandBook , essentially a webpage I occasionally add some areas I explored to it with other people if you are interested.