There's not a lot of code in here. How does the emscripten compile process know how to translate glfw window-creating calls to some sort of canvas output? In other words, how does emscripten know to translate cross-platform window-making calls into some sort of rectangles within the application? Seems like pure magic. Or does Emscripten have to explicitly support glfw before glfw cpuld be used, so that it can map calls to some DOM calls?
And the GL calls? Does it only work with gles, and emscripten knows how to translate to WebGL calls?