2 ms·
There are already several libs that compile to WebAssembly and let you manipulate the DOM, e.g. https://github.com/mbasso/asm-dom https://github.com/mbasso/asm
by flohofwoe 8y ago
There are already several libs that compile to WebAssembly and let you manipulate the DOM, e.g.
https://github.com/mbasso/asm-dom https://github.com/mbasso/asm-dom
You can already call out to small JS code snippets that work on the DOM from WAM, and since DOM manipulation is slow anyway, the small overhead you get for calling into JS won't make a difference. So I'd say, go ahead and manipulate the DOM from WASM, even if WASM supports direct DOM access later it won't make much of a difference (apart from slightly less and cleaner code in the DOM-access library).