The Emscripten library is not guaranteed to be fully loaded during the script element's onload event. Module.onRuntimeInitialized seems to be more reliable.