Function js::jsapi::Construct
[−]
[src]
pub unsafe extern "C" fn Construct(
cx: *mut JSContext,
fun: HandleValue,
newTarget: HandleObject,
args: *const HandleValueArray,
objp: MutableHandleObject
) -> bool
Invoke a constructor. This is the C++ equivalent of
rval = Reflect.construct(fun, args, newTarget)
.
JS::Construct() takes a newTarget
argument that most callers don't need.
Consider using the four-argument Construct signature instead. (But if you're
implementing a subclass or a proxy handler's construct() method, this is the
right function to call.)
Implements: ES6 7.3.13 Construct(F, [argumentsList], [newTarget]). Use this function to invoke the [[Construct]] internal method.