top | item 31975131

(no title)

ggktk | 3 years ago

Unfortunately, that doesn't seem the way WASM is going. It's been 5 years and we still can't access the DOM without going through JS.

discuss

order

jpgvm|3 years ago

There isn't the political will-power to make it happen and force all the browser vendors to agree and implement. Hence status-quo remains.

afiori|3 years ago

Which is ironic as the DOM interface was designed as an abstract interface (the IDL used in the spec is more interested in compatibility with Java than JS).

In practice though the main reason is that to have decent DOM bindings you need to stabilize many other specs first (unless you do a ultra-specific DOM-only extension, but nobody wants that)

marcosdumay|3 years ago

WASM can access the DOM by its foreign functions interface. It still needs some data conversion, but it's not through JS.

Rust, for example, has a huge package with interfaces for every DOM function.