MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / NewTarget

Method NewTarget

napi-inl.h:4245–4250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4243}
4244
4245inline Value CallbackInfo::NewTarget() const {
4246 napi_value newTarget;
4247 napi_status status = napi_get_new_target(_env, _info, &newTarget);
4248 NAPI_THROW_IF_FAILED(_env, status, Value());
4249 return Value(_env, newTarget);
4250}
4251
4252inline bool CallbackInfo::IsConstructCall() const {
4253 return !NewTarget().IsEmpty();

Callers 1

NewTargetCallbackFunction · 0.80

Calls 1

ValueFunction · 0.70

Tested by

no test coverage detected