callMethod<R extends JSAny?> method
Calls method
on this JSObject with up to four arguments.
Returns the result of calling method
, which must be an R
.
This helper doesn't allow passing nulls, as it determines whether an argument is passed based on whether it was null or not. Prefer callMethodVarArgs if you need to pass nulls.
Implementation
R callMethod<R extends JSAny?>(JSAny method,
[JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) =>
_callMethod(method, arg1, arg2, arg3, arg4) as R;