I have Global JavaScript object structured like below,


foo Object
> gee property
>> nee() function
>> zee() function



I used two possible ways to call the nee function, see below,


1 Method

emscripten::val::global("foo").call<void>("gee.nee");

2 Method

emscripten::val::global("foo['gee']").call<void>("nee");


However, none of these working at all instead output errors, see below,

1 Method Output

TypeError: handle[name] is not a function

2 Method Output

TypeError: Cannot read property 'nee' of undefined,TypeError: Cannot read 
property 'nee' of undefined


I was able to do Object Key based verification through emscripten::val of 
the Object and can confirm both Object and Property are in Global Scope.

Even though, I was not able to run Object Keys through emscripten::val to 
grab the functions inside gee Property.

But using Client Side JS, I was able to run Object Keys to grab functions 
inside gee Property.


I can call same Function through EM_JS but it's not suitable for my project 
for some obvious reasons.


So, I would like to hear the right way to call this function through 
emscripten::val?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/e595abca-c69d-4713-8e3d-7dffdd3e0b68%40googlegroups.com.

Reply via email to