On Thursday, January 9, 2014 4:24:38 AM UTC-9, Pierre Saunier wrote:
>
> Third, If I want to call a specific javascript function from C/C++, I can 
> create a string that call the function and execute it... is there a quicker 
> way?
>

Not sure if it is quicker, but it is more elgant:
https://github.com/FlyingJester/TurboSphere/blob/master/engine.cpp#L344
 
You can call Get from a context's global object with the name of the 
function you want, cast the value handle to a function handle, and use the 
Call() method.

I believe except for that last part, it would be the same to check if a 
variable existed and get its value.

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to