I think what you need is the

  Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]);

method from the Function class.  See include/v8.h around line 1070ish.

On Mon, Sep 15, 2008 at 7:50 AM, rajika <[EMAIL PROTECTED]> wrote:
>
> hi,
> I have a Javascript method which is written in a separate Javascrpt
> file, which take one argument. And I need to call this Javascript
> method within C++, and pass my argument to that method, and get the
> result. So for example my Javascript file will something like below.
>
> function f(str){
>     return str.name;
> }
>
> So I want execute this method  using V8 passing the argument. I looked
> at the samples given and I was able to compile and run a Javascript
> source file, but I need to do something above(i.e. pass the argument
> within v8 to the Javascript method). Is this possible ? Let me know
> any tips. Any sample code would be great.Thanks in advance.
> >
>



-- 
Erik Corry, Software Engineer
Google Denmark ApS. CVR nr. 28 86 69 84
c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018
Copenhagen K, Denmark.

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

Reply via email to