10 ms·
I get what components are supposed to do, but how does wasm currently talk with the browser and javascript code? Can it manipulate the DOM and execute asynchron
by bno1 5y ago
I get what components are supposed to do, but how does wasm currently talk with the browser and javascript code? Can it manipulate the DOM and execute asynchronously (like promises) or is it just a black box that receives some data and returns other data synchronously?
- matei_radu 5y agoBy default, a WebAssembly module has no access to any host APIs — particularized for the web platform, a running module will have no way of accessing the DOM by default. When instantiating a module, it can use module imports [1], which can be used to access the DOM through JavaScript calls. [1]: https://webassembly.github.io/spec/core/syntax/modules.html#syntax-import https://webassembly.github.io/spec/core/syntax/modules.html#...