hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression.
- iOS 7.0+
- macOS 10.5+
- tvOS 9.0+
The execution context to use.
The JSObject that is the target of the 'instanceof' expression.
The JSValue being tested to determine if it is an instance of constructor.
A pointer to a JSValueRef in which to return an exception, if any.
true if possibleInstance is an instance of constructor, otherwise false.
If you named your function HasInstance, you would declare it like this:
bool HasInstance(JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception);
If this callback is NULL, 'instanceof' expressions that target your object will return false.