Question

I have the following code in javascript:

var c = new addon.Component();
c.ComponentLength = 3

How should i build my addon, so i can do the previous code? I've already followed the tutorials in http://nodejs.org/api/addons.html , but i'm stuck here.

Is this possible? Does anyone have a solution?

Thanks in advance.

Was it helpful?

Solution

The solution is on the v8.h, search for SetAccessor , which "Sets an accessor on the object template.".

An example: http://syskall.com/how-to-write-your-own-native-nodejs-extension/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top