Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

node_api_set_prototype

functionexperimentaljs_native_api.h

This API sets the prototype of the Object passed in.

Stability: 1 - Experimental

napi_status node_api_set_prototype(napi_env env,
                                   napi_value object,
                                   napi_value value);
  • [in] env: The environment that the Node-API call is invoked under.
  • [in] object: The object on which to set the prototype.
  • [in] value: The prototype value.

Returns napi_ok if the API succeeded.

This API sets the prototype of the Object passed in.

View in the official Node.js documentation