Uh oh!
There was an error while loading. Please reload this page.
doc: Updating addons examples - #5362
Conversation
indutny
commented
Feb 22, 2016
LGTM if CI is green. |
indutny
commented
Feb 22, 2016
There was a problem hiding this comment.
Why only return in c++?
There was a problem hiding this comment.
Ah, actually. I see your point. No need in return here!
There was a problem hiding this comment.
Can remove, I personally like returning early.
There was a problem hiding this comment.
Please remove it, I think it is confusing.
There was a problem hiding this comment.
Fine for me anyhow. First I was wondering though why args.GetReturnValue().Set(args.This()); is not necessary anymore, but I may have missed API changes.
There was a problem hiding this comment.
Fine for me anyhow. First I was wondering though why args.GetReturnValue().Set(args.This()); is not necessary anymore, but I may have missed API changes.
Same here, but nodejs/node-addon-examples#49 (comment) says that with a construct call the return value is always this.
Please remove it, I think it is confusing.
Sure :]
There was a problem hiding this comment.
Ah, very interesting. Thanks for pointing at this. If it makes sense, have the content of Bens comment in the docs explicitly.
eljefedelrodeodeljefe
commented
Feb 22, 2016
|
bnoordhuis
commented
Feb 22, 2016
But why? |
tomgco
commented
Feb 23, 2016
To keep it consistent with the |
There was a problem hiding this comment.
as long as we're going const lets go console.log(${obj1.msg}, ${obj2.msg});
There was a problem hiding this comment.
Actually, console.log takes variable arguments so console.log(obj1.msg, obj2.msg) would also work.
rvagg
commented
Feb 23, 2016
lgtm pending the various points above being sorted out |
* Add more explicit error checking in c++ * Specific namespaces in headers * `const` in JS examples instead of `var`
| void RunCallback(const FunctionCallbackInfo<Value>& args) { | ||
| Isolate* isolate = args.GetIsolate(); | ||
| if (!args[0]->IsFunction()) { | ||
| return; |
There was a problem hiding this comment.
I was thinking the same thing since it's done below, but in terms of a learning experience it may be better to introduce these things at a slower pace? I don't mind either way tbh.
jasnell
commented
Mar 2, 2016
LGTM ... looks like the PR may be to be rebased tho. |
benjamingr
commented
Mar 16, 2016
Ping @tomgco - are you still pursuing this? |
7da4fd4 to
c7066fbCompareaddaleax
commented
May 17, 2016
ping @tomgco again |
c133999 to
83c7a88Comparejasnell
commented
Feb 28, 2017
Closing given the lack of forward progress on this |
constin JS examples instead ofvarcc\ @nodejs/documentation
This is based on the work that is being carried out in nodejs/node-addon-examples#49.