4 ms·
Because I've read it here and elsewhere quite often: What is missing from WASM in the browser isn't "just" DOM access, but "everything" else - including fetch o
by ReleaseCandidat 3y ago
Because I've read it here and elsewhere quite often:
What is missing from WASM in the browser isn't "just" DOM access, but "everything" else - including fetch or XMLHttpRequest - too. Here is a list of all web APIs supported by browsers and not supported by WASM, the DOM is just one of them: https://developer.mozilla.org/en-US/docs/Web/API https://developer.mozilla.org/en-US/docs/Web/API
But at least there is hope, that these interfaces will be available once GC is final and supported by browsers:
Once GC is supported, WebAssembly code would be able to reference and access JavaScript, DOM, and general WebIDL-defined objects.
Last paragraph at https://webassembly.org/docs/web/ https://webassembly.org/docs/web/
- andsoitis 3y agoGC proposal is from 2018: https://github.com/WebAssembly/proposals/issues/16 https://github.com/WebAssembly/proposals/issues/16 and there’s code: https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md https://github.com/WebAssembly/gc/blob/master/proposals/gc/O... Seems like an awefully long time for progress to be made, given all the possibilities it would unlock.
- ReleaseCandidat 3y agoYes, but it is now (for some months) supported by V8 (browser, Node and Deno - hidden behind a flag) and Wasmedge and Wasmtime will both have implementations soon. But I wouldn't hold my breath to being able to call web APIs directly from WASM ;)
- Hadriel 3y agoI haven't been following webassembly, but as the former 'cure' for JS, why has it taken so long to get the basics?
- ruune 3y agoIt's niche. Front end devs want to use JS or equivalents, not back end languages. And back end devs don't want to browser stuff. So only full stack devs left
- tabtab 3y agoIf they "solve" that then they risk being the next Java Applets.
- cedws 3y agoFunny how have things have progressed. We went from using HTML + CSS for simple presentation of information, to enriching with small amounts of client side scripting, to plug-and-play sandboxed applications with Flash/Java. Then we realised those were a terrible idea, Flash and Java Applets died, so we started treating JavaScript as a compilation target to mount behemoth abstractions enabling a native application-like experience. When browsers collapsed under the weight of all that crap, WASM was born by necessity. And so we're back to applets. Am I getting this right?
- tabtab 3y agoOur current web standards are ill-suited for what we really want out of the web (rich desktop-like GUI's), so people keep trying different things in desperation. One thing not really tried yet is a state-ful GUI markup language standard. Also, maybe applets could be done right on a second try, applying lessons of the first.
- yxre 3y ago[dead]