createFunctionArg4 method

Function createFunctionArg4(
  1. Function dartFunction
)
override

Implementation

Function createFunctionArg4(Function dartFunction) {
  final funcId = dartFunction.hashCode.toString();
  Context.functionMap[funcId] ??= (arg0, arg1, arg2, arg3) {
    return JSObject.transformToBrowserJSObject(dartFunction(
      JSObject.transformToMPJSObject(arg0),
      JSObject.transformToMPJSObject(arg1),
      JSObject.transformToMPJSObject(arg2),
      JSObject.transformToMPJSObject(arg3),
    ));
  };
  Context.functionArgsCount[funcId] = 4;
  return Context.functionMap[funcId]!;
}