starting to add hooks for emscripten (browserrrrr) supprot