We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9509bf commit 87fe58eCopy full SHA for 87fe58e
src/robotjs.cc
@@ -47,14 +47,15 @@ Handle<Value> getMousePos(const Arguments& args)
47
return scope.Close(obj);
48
}
49
50
-Handle<Value> mouseClick(const Arguments& args)
+NAN_METHOD(mouseClick)
51
{
52
- HandleScope scope;
+ NanScope();
53
54
MMMouseButton button = LEFT_BUTTON;
55
56
clickMouse(button);
57
- return scope.Close(String::New("1"));
+
58
+ NanReturnValue(NanNew("1"));
59
60
61
/*
@@ -124,7 +125,7 @@ void init(Handle<Object> target)
124
125
126
target->Set(NanNew<String>("typeString"),
127
NanNew<FunctionTemplate>(typeString)->GetFunction());
-
128
129
130
131
NODE_MODULE(robotjs, init)
0 commit comments