napi_get_prototype
napi_status napi_get_prototype(napi_env env,
napi_value object,
napi_value* result)
-
[in] env
:调用 API 的环境。¥
[in] env
: The environment that the API is invoked under. -
[in] object
:napi_value
表示要返回其原型的 JavaScriptObject
。这将返回Object.getPrototypeOf
的等价物(与函数的prototype
属性不同)。¥
[in] object
:napi_value
representing JavaScriptObject
whose prototype to return. This returns the equivalent ofObject.getPrototypeOf
(which is not the same as the function'sprototype
property). -
[out] result
:napi_value
表示给定对象的原型。¥
[out] result
:napi_value
representing prototype of the given object.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.