4 ms·
You still have to ferry data in and out of Javascript to interact with the page. In the long-term, maybe language-specific bindings to interact with DOM APIs wi
by AgentME 10y ago
You still have to ferry data in and out of Javascript to interact with the page. In the long-term, maybe language-specific bindings to interact with DOM APIs will become popular, but otherwise to get anything done in most cases you're probably going to expend enough effort on ferrying things in and out of JS land to negate the possible benefits of not needing to deal with a different language. I'd be surprised if many do it soon for anything more than a small high-performance core or for a large application that has a small DOM surface area (a game that just renders to a canvas).
- Svenskunganka 10y agoYes of course, but only during the early stages. The post-MVP roadmap for WebAssembly specifies DOM & Web API integration (http://webassembly.org/docs/gc/ http://webassembly.org/docs/gc/), so that specific case will too disappear with time. If you read point 3 on this page (http://webassembly.org/docs/high-level-goals/ http://webassembly.org/docs/high-level-goals/) you should realize that the need for JavaScript won't be required at that point. edit: I'd like to clarify that I'm not saying wasm will boom in usage over night, but as time goes on, the rough edges clears up & features like these are added it might become the better choice.
- the_duke 10y agoDirect DOM access including manipulation is planned for WebAssembly. They wanted to progress on the spec and push it out without that, but it's on the roadmap. (Along with GC integration).
- bluejekyll 10y agoCan someone explain what the option is for accessing the dom initially? Is there some wrapper JS that will be needed to call into the wasm?
- mikepurvis 10y agoYes: https://github.com/WebAssembly/design/issues/119 https://github.com/WebAssembly/design/issues/119
- steveklabnik 10y agoYup, see stuff like https://crates.io/crates/webplatform https://crates.io/crates/webplatform
- bluejekyll 10y agoOmg, hello. How did I miss that!