MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / CallJsWrapper

Function CallJsWrapper

napi-inl.h:404–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402
403template <typename ContextType, typename DataType, typename CallJs, CallJs call>
404inline typename std::enable_if<call != static_cast<CallJs>(nullptr)>::type
405CallJsWrapper(napi_env env, napi_value jsCallback, void* context, void* data) {
406 details::WrapVoidCallback(env, [&]() {
407 call(env,
408 Function(env, jsCallback),
409 static_cast<ContextType*>(context),
410 static_cast<DataType*>(data));
411 });
412}
413
414template <typename ContextType, typename DataType, typename CallJs, CallJs call>
415inline typename std::enable_if<call == static_cast<CallJs>(nullptr)>::type

Callers

nothing calls this directly

Calls 3

WrapVoidCallbackFunction · 0.85
FunctionClass · 0.85
CallMethod · 0.80

Tested by

no test coverage detected