Hacker News new | past | comments | ask | show | jobs | submit login

Unfortunately the DOM APIs were specified to have Javascript-specific details in them. As far as I understand it, the best way to access the DOM from WASM would be to define a new WASI Component -compatible API for the DOM.

Nobody's done the work yet, and I think the current strategy is to tackle easier APIs first, as WASI might not be good enough to describe the DOM at this time.

With a DOM API independent of Javascript, you could have a C/C++/Rust DOM in the host, and C/C++/Rust code inside WASM calling functions on the DOM, without needing to talk about Javascript types in the middle.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: