HNHacker News
TopNewBestAskShowJobs

mbasso

144 karma · joined July 7, 2016

submissionscomments
mbasso··on Asm-Dom – WebAssembly Virtual DOM
Yes! h always returns a memory address to a VNode. In C++ this address is reinterpreted in a VNode, that contains others VNode as children. If you decide to manually manage the memory, you can implement some interesting mechanism to diff vnodes and create vdom trees. To do this, I have to develop some APIs that allows you, for example, to replace a children with another and so on. This is certainly on the roadmap!
mbasso··on Asm-Dom – WebAssembly Virtual DOM
DOM interactions are a future feature, I'll update asm-dom to pure WASM without JS when they'll be supported!
mbasso··on Asm-Dom – WebAssembly Virtual DOM
Thank you for your answer. I just want to add a little thing to the first point.

> Why the single quotes around function names?

In this case I use quotes to prevent name mangling. I have to be sure that the uglify plugin in webpack does not mangle the names of that object because I'll call it from C++ in this way:

window['asmDomHelpers']['domApi']['createComment'](...)

Also, for the same reason, here I'm using this notation instead of this one:

window.asmDomHelpers.domApi.createComment(...)

to let know the closure compiler that I don't want name mangling.

Without quotes these two different compile processes might cause some problems

mbasso··on Asm-Dom – WebAssembly Virtual DOM
In the "How to apply this license" section it is not mentioned https://choosealicense.com/licenses/mit/

If someone has more information or links about that, please let me know

mbasso··on Asm-Dom – WebAssembly Virtual DOM
This is the license of the example project, the license of asm-dom is in the root dir
mbasso··on Asm-Dom – WebAssembly Virtual DOM
Just committed a fix for that in license.md