Hi, 

I am trying to create a C++ function that will be able to call a JS 
function.

I am using node-gyp with v8 but and I'm not familiar with Napi and I have 
very basic understanding of the local / context / isolate. 

Although, I have already a working exemple of JS calling a C function. 

void CallCFunctionWithJS(const FunctionCallbackInfo<Value>& args) {

    Isolate* isolate = args.GetIsolate();
     function();

  args.GetReturnValue().Set(String::NewFromUtf8(isolate, "exit"));
}


The problem is : I try to achieve the opposite. 


void CallJSFunctionWithC(void)
{
  ??? console.log();   ???
}


Is there an easy way to create a function that will allow me to do this. 

If not, how can I send Async notification to my JS code when I receive a 
change of value in C. Thanks alot.




-- 
-- 
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 receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/70f3335d-4fc3-476c-bf3d-221debedcb20n%40googlegroups.com.

Reply via email to