문제

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.

도움이 되었습니까?

해결책

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top