3 ms·
Are there plans to add DOM support? That seems pretty critical for what I had thought wasm was supposed to be myself.
by edgyquant 3y ago
Are there plans to add DOM support? That seems pretty critical for what I had thought wasm was supposed to be myself.
- danielvaughn 3y agoI'm not sure. All I know is that there are some hurdles to get past. One of them is that several DOM APIs were created specifically for JavaScript, which is...really disheartening.
- davexunit 3y agoWasm allows for importing host functions. Those host functions could provide DOM access. With Wasm GC it is possible to pass external references (DOM nodes, promises, etc.) to and from Wasm. What this looks like in practice is that a thin JS bootstrap script instantiates the Wasm module, passing along a set of JS functions that map to the declared Wasm imports and then the program is effectively driven from Wasm at that point.