construct_with_new_target in js_sys::Reflect - Rust (original) (raw)
js_sys0.3.91
In js_sys::Reflect
Function construct_with_new_target
pub fn construct_with_new_target(
target: &Function,
arguments_list: &Array,
new_target: &Function,
) -> Result<JsValue, JsValue>Expand description
The static Reflect.construct() method acts like the new operator, but as a function. It is equivalent to calling new target(...args). It gives also the added option to specify a different prototype.