4 ms·
Well, you still can't do that—WASM doesn't have DOM bindings, you'd still have to ship out to JS. I believe that's a goal, so yes eventually that could be a ben
by vcarl 7y ago
Well, you still can't do that—WASM doesn't have DOM bindings, you'd still have to ship out to JS. I believe that's a goal, so yes eventually that could be a benefit, but not at the moment.
- asdkhadsj 7y agoFwiw, you can - just perhaps with not pure WASM and perf. My next app I'm planning on using a Rust WASM DOM framework, and I know there are some in Go as well. This is primarily for developer UX.
- pjmlp 7y agoDOM bindings are kind of irrelevant when one has WebGL. One example among many ramping up https://platform.uno/ https://platform.uno/
- icebraining 7y agoI looked into their WebAssembly demo, but it doesn't seem to use WebGL, just a regular DOM (with an ungodly number of elements).
- pjmlp 7y agoThat was just an example, maybe not the best one. I should just have linked something done in Unity instead.
- mrec 7y agoFor a smallish subset of use cases, maybe. But replacing the DOM with a canvas-based UI for general use would be reinventing many of the problems of Flash.
- pjmlp 7y agoMany designers and game devs see it otherwise.
- TeMPOraL 7y agoGamedev is a separate topic. As for designers, they are on the opposite side from users in the tug-of-war of control over content rendering. I don't believe they should get 100% of their way.
- mrec 7y agoGamedev falls squarely into my "smallish subset of use cases". It does legitimately need non-DOM UI, but it's not a huge part of the Web (yet). As for designers, thank you for finding a much more diplomatic phrasing than the one I was about to write.
- deleted 7y ago[deleted]
- the8472 7y agoRendering UIs in webgl is fairly user-hostile. No accessability, no extensions, no custom styles, ...
- pjmlp 7y agoYes it keeps coming up, yet Flash will have its revenge.
- Rusky 7y agoWebGL bindings are on the same footing as DOM bindings- they're not an alternative in this sense, because insofar as we have one we already have the other.
- pjmlp 7y agoNo because accessing WebGL contexts directly from WebAssembly, specially WebGPU ones, is something that keeps coming up in some Chrome presentations. And thanks to many, including HN readership, Chrome and Safari are the only browsers that many businesses care about nowadays.
- Rusky 7y agoWhat I'm saying is, the feature/mechanism that lets WebAssembly call WebGL or WebGPU is exactly the same one that lets it call DOM APIs. The same implementation work supports both.
- miguelrochefort 7y agoUno uses DOM bindings, not WebGL.