2 ms·
> I assume browsers will one day expose a native DOM API. TBH, that's extremely unlikely to happen. The entire DOM is built around the Javascript object model,
by flohofwoe 3y ago
> I assume browsers will one day expose a native DOM API.
TBH, that's extremely unlikely to happen. The entire DOM is built around the Javascript object model, trying to map the DOM to a C-style API would be possible, but inconvient to use and performance-wise it really wouldn't make a difference compared to going through a JS shim (since performance will be dominated by the browser-intenal DOM implementation, not by the user code manipulating it).
A 'WASM-native' WebGPU API would make a lot more sense, but again, that's extremely unlikely to happen.
The currently required Javascript shim might still disappear, but only because it might be generated automatically under the hood in the future.