convertJSObjectCallAsConstructorCallback function
JSObjectRef
convertJSObjectCallAsConstructorCallback(
- JSContextRef ctx,
- JSObjectRef constructor,
- int argumentCount,
- Pointer<
JSValueRef> arguments, - Pointer<
JSValueRef> exception, - JSObject fn(
- JSContext context,
- JSObject constructor,
- List<
JSValue> arguments, - JSException exception,
Implementation
JSObjectRef convertJSObjectCallAsConstructorCallback(
JSContextRef ctx,
JSObjectRef constructor,
int argumentCount,
Pointer<JSValueRef> arguments,
Pointer<JSValueRef> exception,
JSObject Function(JSContext context, JSObject constructor, List<JSValue> arguments, JSException exception) fn,
) {
final JSContext context = JSContext(ctx);
return fn(context, JSObject(context, constructor), JSValueConverter.toJSValues(context, argumentCount, arguments), JSException(context, exception)).ref;
}