Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document optional params in napi_get_cb_info #40821

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4630,14 +4630,18 @@ napi_status napi_get_cb_info(napi_env env,
* `[in] env`: The environment that the API is invoked under.
* `[in] cbinfo`: The callback info passed into the callback function.
* `[in-out] argc`: Specifies the length of the provided `argv` array and
receives the actual count of arguments.
receives the actual count of arguments. `argc` can
optionally be ignored by passing `NULL`.
* `[out] argv`: Buffer to which the `napi_value` representing the arguments are
copied. If there are more arguments than the provided count, only the
requested number of arguments are copied. If there are fewer arguments
provided than claimed, the rest of `argv` is filled with `napi_value` values
that represent `undefined`.
* `[out] this`: Receives the JavaScript `this` argument for the call.
* `[out] data`: Receives the data pointer for the callback.
that represent `undefined`. `argv` can optionally be ignored by
passing `NULL`.
* `[out] this`: Receives the JavaScript `this` argument for the call. `this`
can optionally be ignored by passing `NULL`.
* `[out] data`: Receives the data pointer for the callback. `data` can
optionally be ignored by passing `NULL`.

Returns `napi_ok` if the API succeeded.

Expand Down