by paulgb · 3y ago · 0 comments
Google Docs switched to rendering a full screen canvas rather than using the DOM, and Flutter/Compose do the exact same thing.
WASM is very much heading in the direction of owning a rectangle on the screen. Plus, Java and Flash embeds could also call Javascript callbacks while leveraging the improved performance of their native plugins.
Another pattern I’ve seen is to render DOM on top of a canvas, with UI elements done in the DOM, and high-performance graphics on the canvas. This seems to be a good balance. https://x.com/paulgb/status/1688919428740816896?s=46
It doesn't. Any interaction with the page happens through a JS bridge.
> Wasm fits in with semantic web content to the same extent that JS does.
It doesn't. It's a VM that runs side by side and only has a tiny window into the rest of the browser through arrays of integers passed between it and Javascript.
Right. The point I’m trying to make is that Wasm can only interact with the user through those JS APIs. This is in direct contrast to Java/Flash, which could directly render on the screen with an API that bypassed the browser’s JS layer.