napi_instanceof
napi_status napi_instanceof(napi_env env,
napi_value object,
napi_value constructor,
bool* result) [in] env:调用该 API 时所处的环境。[in] object:要检查的 JavaScript 值。[in] constructor:要检查的构造函数的 JavaScript 函数对象。[out] result:如果object instanceof constructor为 true,则此布尔值被设为 true。
如果 API 成功,则返回 napi_ok。
【Returns napi_ok if the API succeeded.】
此 API 表示根据 ECMAScript 语言规范 Section instanceof 运算符 的定义,在对象上调用 instanceof 运算符。
【This API represents invoking the instanceof Operator on the object as
defined in Section instanceof operator of the ECMAScript Language Specification.】