[v8-users] call javascript function from c++

2018-06-06 Thread Robert Nick
Basically I want to: v8::Script::Run v8::Script::Compile -- -- v8-users mailing list v8-users@googlegroups.com 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

Re: [v8-users] call javascript function from c++

2018-06-06 Thread Joe Smack
Yes, the examples are horribly written and hard to understand. And I don't believe any of them covered this: // get the function v8::Local global = context->Global(); v8::Local function_value1 = global->Get(v8::String::NewFromUtf8(isolate, "StartNamespace")); v8::Local a =

Re: [v8-users] call javascript function from c++

2018-06-06 Thread Ben Noordhuis
On Wed, Jun 6, 2018 at 11:42 AM, Joe Smack wrote: > Let's say you compile and run code: > > var StartNamespace = > { > cppTalkTo: function () { > // some code > } > }; > StartNamespace.init(); > > After you compile and run the above code how could you call cppTalkTo from > C++?

[v8-users] call javascript function from c++

2018-06-06 Thread Joe Smack
Let's say you compile and run code: var StartNamespace = { cppTalkTo: function () { // some code } }; StartNamespace.init(); After you compile and run the above code how could you call cppTalkTo from C++? Whats the C++ functions for that? Basically I want to: v8::Script::Run