News for hackers. Stuff that matters.
Re:Missing the Point of WebAssembly by edgyquant on Tuesday January 09, 2024 @03:35PM (#38931721)
Are there plans to add DOM support? That seems pretty critical for what I had thought wasm was supposed to be myself.
Re:Missing the Point of WebAssembly by davexunit on Tuesday January 09, 2024 @04:36PM (#38932449)
Wasm 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.
Re:Missing the Point of WebAssembly by danielvaughn on Tuesday January 09, 2024 @03:50PM (#38931915)
I'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.