js代码是:
const obj = tap.create();
quote.on("connection", (params) => {
console.log('[DEBUG js]', 'connection called, params:', params);
});
记住 C++ 中的函数:
napi_create_reference(env, args[1], 1, &cbMap[eIt->second]);
当调用本机函数时:
void TAP_CDECL Spi::OnConnect(int errorCode, const Info *info) {
{{I want to call the function from cbMap here, How to write code? I do not
known how to find "env"!}}
}