Comment by weinzierl

Comment by weinzierl 3 hours ago

1 reply

If I remember correctly one reason for the direct DOM initiative been held was that it depended on the WASM GC being completed.

"The DOM has been designed as a JS API (for better or worse), accessing that from WASM will always require to go through some FFI layer (this layer may be hidden and automatically created at runtime, but it still needs to exist)."

I don't see that. The DOM is the underlying data structure and what we need is direct access to it form WASM, without FFI or going through JS. WASM should be a first class citizen next to JS.

flohofwoe 31 minutes ago

That would require a "C ABI friendly" alternative DOM API. That's hardly worth the trouble since the performance problems lurk in the actual DOM design and implementation, not in the JS shim. It would make more sense to go that way for lower level web APIs like WebGL or WebGPU.

Also if we're talking big changes like this it would actually make more sense to implement the DOM on top of the 3D APIs, and not the 3D APIs as an appendix of the DOM ;)