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 语言规范 第12.10.4节 的定义,在对象上调用 instanceof 运算符。
🌐 This API represents invoking the instanceof Operator on the object as
defined in Section 12.10.4 of the ECMAScript Language Specification.