Skip to content

N-API: Add method to get own properties #13925

Closed
@mhdawson

Description

@mhdawson
  • Version: ALL
  • Platform: ALL
  • Subsystem: ALL

We need a new function to allow add-ons to get own properties consistently across versions:

```C++
napi_status napi_get_own_property(napi_env e,
                                  napi_value o,
                                  napi_propertyname p,
                                  napi_value* result);

which never walks up the prototype chain.

We also need to validate/ensure that napi_get_property() always walks up the prototype chain.

The N-API team will get to this based on priorities, but this is a good place for others to contribute as well. If you start working on this, assign the issue to yourself and add a comment that you are working on it.

Metadata

Metadata

Assignees

Labels

node-apiIssues and PRs related to the Node-API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions