It is possible to run JavaScript code directly using EM_ASM macros in Emscripten.
This approach could potentially provide a way to support JavaScript externs for the hxcpp wasm target.
https://github.com/alextyner/wasm-canvas/blob/38aa03df3c6656acd8dce5a92ef56afec5abb3bb/src/canvas.c#L15
https://emscripten.org/docs/api_reference/emscripten.h.html