hi, Can you share the code that made this possible, I want to do the same thing, i.e. to call a Javascript method (with an argument) within C++ and get the result. Thanks in advance.
On Sep 6, 5:10 am, [EMAIL PROTECTED] wrote: > Thanks Fenq, that's exactly what I needed. > > Cheers, Paul. > > On Sep 5, 1:57 pm, Feng Qian <[EMAIL PROTECTED]> wrote: > > > Do you mean 'call JavaScript method from C++'? > > > If you, you can do > > > Handle<Value> func = Handle<Function>::Cast(obj->Get(func_name)); > > Handle<Value> result = func->Call(obj, ...); > > > Function is just a JSObject, when calling the function, you pass obj > > as the receiver > > to Function::Call. > > > Cheers, > > Feng > > > On Thu, Sep 4, 2008 at 3:07 PM, <[EMAIL PROTECTED]> wrote: > > > > Just to clarify, I have the v8 object handle, I need to call the > > > javascript method by name > > > > On Sep 5, 8:04 am, [EMAIL PROTECTED] wrote: > > >> I have been using SpiderMonkey, however as a C++ veteran I am far more > > >> comfortable with embedded programming in v8. > > > >> I have a need to call from C++ a method on a javascript object handle > > >> by name, as yet I have been unable to determine a way to do this by > > >> inspecting the v8 code. > > > >> Does anybody know if there is a way I can do this ? --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
