4 ms·
WebAssembly in the browser currently can't manipulate the DOM directly. Neither can it make HTTP requests. You need to use a JS bridge to do that. That has some
by AkshitGarg 5y ago
WebAssembly in the browser currently can't manipulate the DOM directly. Neither can it make HTTP requests. You need to use a JS bridge to do that. That has some overhead. So I don't think webassembly will replace JavaScript anytime soon. It might be reserved for high-performance compute, or maybe canvas based rendering for the time being.
- runawaybottle 5y agoI think the nail in the coffin will only happen when the DOM is killed. If someone can write a rendering engine in WASM that renders to canvas (maybe even render apps with webgl), then can just create a new api for browser apps. That’ll be the end of frontend as we know it, and everyone will have to learn this new api. The benefits are obvious, we’ll finally have a rendering engine for apps. I suppose document-based html pages can stick around, but the rest of us can move on.
- rini17 5y agoAnd it will be exactly as infuriating as Flash was (except for the artist). Change my mind.
- pjmlp 5y agoI won't surely change your mind, that is exactly what I am looking for. WebAssembly made us regress 10 years, and we lost the great GUI based tooling for Web page creation and 3D games that are actually hardware accelerated without browsers doing blacklists. https://platform.uno/ https://platform.uno/
- still_grokking 5y agoYou mean like for example MS Blazor WASM, or Qt for WebAssembly (QML in the browser)? Even I think something like that is long overdue (as the misuse of HTML and DOM as the most horrible GUI framework for application development ever invented should stop immediately) I somehow don't like the outlook of MS Blazor becoming a thing. I hope everybody knows what that would mean: "Windows" (APIs) in the browser… QML on the other hands side looks good (at least from the outside). But it's nowhere close to significant usage, so no hope for that, frankly.
- idsout 5y agoSomething like this? https://emilk.github.io/egui/index.html https://emilk.github.io/egui/index.html
- Unit520 5y agoUpcoming versions of Google Docs will use canvas based rendering [0], and I presume their custom renderer might be compiled to WebAssembly. WASM and Canvas (potentially using WebGL) are definitely an interesting combination right now. [0] https://news.ycombinator.com/item?id=27129858 https://news.ycombinator.com/item?id=27129858