call
Call a callable, with a context object and parameters
call(func, context, ...rest)
Call the callable func as if it were a function, bound to context and with any additional parameters
occurring after context set to the positional parameters.
Note that func must either be natively callable, implement @@can.apply,
or have a callable apply property to work with canReflect.call
var compute = canCompute("foo");
canReflect.call(compute, null, "bar");
canReflect.call(compute, null); // -> "bar"
Parameters
- func
{function(...)}:the function to call with the supplied arguments
- context
{Object}:the context object to set as
thison the function call - rest
{*}:any arguments after
contextwill be passed to the function call
Returns
{*}:
return types and values are determined by the call to func