You can use the context to get the global object, use the global object to 
get to object a (a is a property of the global object), use a to get to 
function fn (fn is a property of a), then cast it to v8::Function and use 
its Call method. Take a look at test/cctest/test-api.cc and search for 
FunctionCall.

Yang



On Thursday, November 1, 2012 9:41:52 AM UTC+1, 袁涛 wrote:
>
> like this
> class MyClass 
> {
>      //setter
>      //gettter
>      public:
>      void TestA()
>      {
>
>      }
> }
>
> Then set FunctionTemplate to js
> js can use this: var a = MyClass(); a.fn= function() {}
>
> my question is : in TestA how can i invoke a.fn?
> TestA is not call by js , no args , mybe it's a async method
> how can i get the Local<object>?
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to