You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calls the `FunctionTemplate`'s _InstanceTemplate's_[`Set()`](https://v8docs.nodesource.com/io.js-3.0/db/df7/classv8_1_1_template.html#a2db6a56597bf23c59659c0659e564ddf).
625
627
628
+
<aname="api_nan_set_call_handler"></a>
629
+
### Nan::SetCallHandler()
630
+
631
+
Set the call-handler callback for a `v8::FunctionTemplate`.
632
+
This callback is called whenever the function created from this FunctionTemplate is called.
633
+
634
+
Signature:
635
+
636
+
```c++
637
+
voidNan::SetCallHandler(v8::Local<v8::FunctionTemplate> templ, Nan::FunctionCallback callback, v8::Local<v8::Value> data = v8::Local<v8::Value>())
638
+
```
639
+
640
+
Calls the `FunctionTemplate`'s [`SetCallHandler()`](https://v8docs.nodesource.com/io.js-3.0/d8/d83/classv8_1_1_function_template.html#a26cf14e36aa1a47091b98536d08ea821).
Sets the callback to be used when calling instances created from the `v8::ObjectTemplate` as a function.
646
+
If no callback is set, instances behave like normal JavaScript objects that cannot be called as a function.
647
+
648
+
Signature:
649
+
650
+
```c++
651
+
void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate> templ, Nan::FunctionCallback callback, v8::Local<v8::Value> data = v8::Local<v8::Value>())
652
+
```
653
+
654
+
Calls the `ObjectTemplate`'s [`SetCallAsFunctionHandler()`](https://v8docs.nodesource.com/io.js-3.0/db/d5f/classv8_1_1_object_template.html#ae0a0e72fb0c5e5f32e255fe5bcc7316a).
0 commit comments