I'm not 100% sure what you're asking, but if you're asking if it's possible for C++ to have a reference to a JavaScript object, then yes, embind, which is built into Emscripten, supports that:
https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html#using-val-to-transliterate-javascript-to-c emscripten::val is implemented as a refcounted, JavaScript-side table of references to JavaScript values. The C++ code maintains indices into that table. On Fri, Feb 13, 2015 at 9:11 AM, Danilo Guanabara <dangua...@gmail.com> wrote: > Is Emscripten already providing a way to get Javascript's object reference? > > Something like: > ObjManager = { > store:function(obj) { ... } // returns id > get:function(id) { ... } // returns obj > free:function(id) { ... } > }; > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Chad Austin Technical Director, IMVU http://engineering.imvu.com <http://www.imvu.com/members/Chad/> http://chadaustin.me -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.