@@ -56,7 +56,7 @@ there to be one or more C++ wrapper modules that provide an inlineable C++
5656API. Binaries built with these wrapper modules will depend on the symbols
5757for the N-API C based functions exported by Node.js. These wrappers are not
5858part of N-API, nor will they be maintained as part of Node.js. One such
59- example is: [node-api](https://github.com/nodejs/node-api).
59+ example is: [node-addon- api](https://github.com/nodejs/node-addon -api).
6060
6161In order to use the N-API functions, include the file
6262[node_api.h](https://github.com/nodejs/node/blob/master/src/node_api.h)
@@ -89,7 +89,9 @@ typedef enum {
8989 napi_generic_failure,
9090 napi_pending_exception,
9191 napi_cancelled,
92- napi_status_last
92+ napi_escape_called_twice,
93+ napi_handle_scope_mismatch,
94+ napi_callback_scope_mismatch
9395} napi_status;
9496```
9597If additional information is required upon an API returning a failed status,
@@ -605,7 +607,7 @@ that has a loop which iterates through the elements in a large array:
605607```C
606608for (int i = 0; i < 1000000; i++) {
607609 napi_value result;
608- napi_status status = napi_get_element(e , object, i, &result);
610+ napi_status status = napi_get_element(env , object, i, &result);
609611 if (status != napi_ok) {
610612 break;
611613 }
@@ -642,7 +644,7 @@ for (int i = 0; i < 1000000; i++) {
642644 break;
643645 }
644646 napi_value result;
645- status = napi_get_element(e , object, i, &result);
647+ status = napi_get_element(env , object, i, &result);
646648 if (status != napi_ok) {
647649 break;
648650 }
@@ -2495,10 +2497,10 @@ performed using a N-API call).
24952497property to be a JavaScript function represented by `method`. If this is
24962498passed in, set `value`, `getter` and `setter` to `NULL` (since these members
24972499won't be used).
2498- - `data`: The callback data passed into `method`, `getter` and `setter` if
2499- this function is invoked.
25002500- `attributes`: The attributes associated with the particular property.
25012501See [`napi_property_attributes`](#n_api_napi_property_attributes).
2502+ - `data`: The callback data passed into `method`, `getter` and `setter` if
2503+ this function is invoked.
25022504
25032505### Functions
25042506#### napi_get_property_names
0 commit comments