Pergunta

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.

Foi útil?

Solução

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/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top