4 ms·
Your complaints have little to do with wasm; as the post says it has no direct access to the DOM. wasm is only supposed to speed up heavy computations like tho
by steinuil 9y ago
Your complaints have little to do with wasm; as the post says it has no direct access to the DOM.
wasm is only supposed to speed up heavy computations like those needed to decode and rasterize the PDF, modifying the page is still done through javascript.
- vvanders 9y agoYup there's zero reason this couldn't just output a dom manipulation via FFI into straight JS code. It's fairly straightforward to do with wasm/asm.js.
- lomnakkus 9y agoJust curious: Has anyone does this yet? Specifically, I'm thinking of something vdom-like with the possibility of callbacks into wasm. Obviously, they would have to go some type of string marshalling and "proxied" IDs for callbacks, but the applications I'm thinking of don't require "huge" performance.
- vvanders 9y agoYup, you call a c function that calls out to JS and then make whatever dom/canvas calls you want.
- lomnakkus 9y agoDo you happen to have a link to an implementation for wasm?
- vvanders 9y agoNot publicly, the emscripten docs covers it in pretty good detail: http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#implement-c-in-javascript http://kripken.github.io/emscripten-site/docs/porting/connec...