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

Objectwrap and ClassPropertyDescriptor documentation #321

Closed
wants to merge 9 commits into from
Closed

Objectwrap and ClassPropertyDescriptor documentation #321

wants to merge 9 commits into from

Conversation

NickNaso
Copy link
Member

Hi everyone,
I just start on writing documentation for Napi::ObjectWrap please review and suggest me some changes and possible improvements.

InstanceMethod("SetValue", &Example::SetValue)
});

constructor = Napi::Persistent(func);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments here that talk about how the persistent is used and why suppress destruct is needed would be good.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok it's reasonable give more explanation about this.

};

Napi::Object Example::Init(Napi::Env env, Napi::Object exports) {
Napi::HandleScope scope(env);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the handle scope needed here? I'm not sure but worth checking

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not necessary I will remove it. (I tested the example without handle scope).

@mhdawson
Copy link
Member

mhdawson commented Sep 6, 2018

Ran out of time today, will try to add more comments tomorrow.

@NickNaso NickNaso changed the title First pass on objectwrap documentation Objectwrap and ClassPropertyDescriptor documentation Sep 17, 2018
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, added a few changes. @NickNaso I'll go ahead and land, but it probably makes sense for you to review the final version to make sure you like the changes I made.

mhdawson pushed a commit that referenced this pull request Sep 18, 2018
PR-URL: #321
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@mhdawson
Copy link
Member

Landed as 100d0a7

@mhdawson mhdawson closed this Sep 18, 2018
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
PR-URL: nodejs/node-addon-api#321
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
PR-URL: nodejs/node-addon-api#321
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
PR-URL: nodejs/node-addon-api#321
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
austinli64 added a commit to austinli64/node-addon-api that referenced this pull request May 9, 2023
PR-URL: nodejs/node-addon-api#321
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
PR-URL: nodejs/node-addon-api#321
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants