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-va
On 14/02/2015 04:11, Danilo Guanabara 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) { ... }
};
Possibly related: I've
We don't have such a generic mechanism, but the pattern is used in the GL
bindings and other places.
- Alon
On Fri, Feb 13, 2015 at 9:11 AM, Danilo Guanabara
wrote:
> Is Emscripten already providing a way to get Javascript's object reference?
>
> Something like:
> ObjManager = {
> store:func