Reputation: 39
When i embedded chakracore i could get argument which contains passed callback and execute this function with my own passed arguments to callback. How can i do it in v8 engine?
js example
readFile("C:/test.txt", (data, err) => {console.log(data, err)})
I tried to google this problem but didn't find answers.
Upvotes: 0
Views: 52
Reputation: 40501
v8::Function
has a Call(...)
method.
See the V8 samples for various examples how to use the V8 API.
Upvotes: 0