Re:Why WebAssembly Is Faster Than Asm.js
by bzbarsky on Thursday March 16, 2017 @03:19PM
(#13888196)
> Java applets never had, and never were planned to, have access to the DOM.
Well... see https://en.wikipedia.org/wiki/NPAPI#LiveConnect
Now it's true that it involved more hoops, especially for someone who just knew Java but not DOM bits, so implementing a GUI using Swing or whatever was a path of least resistance. But it wasn't the only path.
> Webasm still can't manipulate the DOM
Not directly, but via FFI to JS it can.... Pretty similar to LiveConnect in some ways.
Webasm still can't manipulate the DOM, so it's still not very useful as a replacement for JS, but it is planned. To really replace JS though, we'd need webasm to support garbage-collected languages for ease of use. Probably, some dynamically typed languages as well.