Call Local<Function> with ObjectWrap as argument
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp, node.js
- Domain
- documentation
Research direction
Start with the Node.js addon examples and the ObjectWrap, Local, and Local API documentation named in the issue. Done means documenting a supported way to create an ObjectWrap-backed value and pass it to the persistent JavaScript callback without constructor round-tripping.
Written by the indexing model from the issue text.
Description
I cannot find any information on how to create an ObjectWrap and pass it as an argument to a Local. I have a persistent callback registered and need to call it with a new instance of an ObjectWrap. I could do this by calling the (JS) constructor and pass it (JS) arguments which returns a new instance, but I want to avoid this round tripping.
Basically: how to create an ObjectWrap and get a Local out of it so that I can pass it as an argument to a JS function?
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 602
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/node-addon-examples
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
nodejs/node-addon-examples#585 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
nodejs/node-addon-examples#530 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nodejs/node-addon-examples#445 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
nodejs/node-addon-examples#444 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
nodejs/node-addon-examples#381 ·
All issues in nodejs/node-addon-examples
Similar issues
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Needs: Author Feedback Needs: Repro
Difficulty 1/5 Under an hour Newbie friendliness 92/100
react/react-native#58621 · 1 comment ·
-
comp-query-execution fuzz
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121303 · 3 comments ·
-
[BUG] Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
eunomia-bpf/llvmbpf#51 · 1 comment ·
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PX4/PX4-Autopilot#28776 ·