by GiorgioG · 6y ago · 0 comments
edit: Look at Blazor and Yew for example, these types of frameworks can and will replace the bulk of what we use JS for today.
It's funny tough, people are starting to pump giant runtimes over the air just to get C# running on the frontend, while people already complaining about JS bundle size smh.
Currently WASM is a way worse in terms of shipping on the web. On top of wrapper JS scripts, .wasm files are treated as statice files like image files. You have extra burden with the path of every .wasm files.
Currently DOM libraries using WASM are implemented by importing JS wrapper functions.
The point of doing it is of course performance.
It is...
"To realize the high-level goals of (1) integrating well with the existing Web platform and (2) supporting languages other than C++, WebAssembly needs to be able to...reference DOM and other Web API objects directly from WebAssembly code...call Web APIs (passing primitives or DOM/GC/Web API objects) directly from WebAssembly without calling through JavaScript..."