Emscripten support, JavaScript API