My node version is v12.18.2 Le mercredi 7 juillet 2021 à 14 h 25 min 02 s UTC-4, Philippe Richard a écrit :
> 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/c0ceceb1-b504-45af-8f73-d55191696e26n%40googlegroups.com.