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

Support lambdas as v8pp::property() getters and setters #93

Open
VitaminCpp opened this issue Sep 10, 2018 · 3 comments
Open

Support lambdas as v8pp::property() getters and setters #93

VitaminCpp opened this issue Sep 10, 2018 · 3 comments

Comments

@VitaminCpp
Copy link

This is a critical issue, because currently I'm not able to inject C++-only parameters into v8pp::module exported modules.

JS:
var myVar = objectA.objectB.object.C.prop;

C++:

v8pp::module objectA(ctx.isolate());
v8pp::module objectB(ctx.isolate());
v8pp::module objectC(ctx.isolate());

std::string myProp = "myProb";

objectB
  .set("objectC", objectC);
  .set("prop", v8pp::property([myProp] { return myProp; }); // <- doesn't work!

objectA.set("objectB", objectB);
@pmed
Copy link
Owner

pmed commented Sep 15, 2018

Seems to be related to #72

I have a local branch with some work-in-progress for this issue, but have no spare time to complete it.

@atvise
Copy link

atvise commented Sep 18, 2018

Hi @pmed,

can I help you to implement this in any way ?

@pmed
Copy link
Owner

pmed commented Dec 27, 2018

Hi @VitaminCpp

The changes from PR #72 were merged to version-2.0 branch, but I'm not sure they would be backported to the master.

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

No branches or pull requests

2 participants