> By itself, WebAssembly cannot currently directly access the DOM; it can only call JavaScript, passing in integer and floating point primitive data types. Thus, to access any Web API, WebAssembly needs to call out to JavaScript, which then makes the Web API call. Emscripten therefore creates the HTML and JavaScript glue code needed to achieve this.
> Note: There are future plans to allow WebAssembly to call Web APIs directly.
https://developer.mozilla.org/en-US/docs/WebAssembly/Concept...