wasm-bindgen
wasm-bindgen copied to clipboard
fix - js_sys::Function::apply expects &JsValue as the first argument
The method apply for js_sys::Function expects a reference as the first argument to a js_value
/// The `apply()` method calls a function with a given this value, and arguments provided as an array
/// (or an array-like object).
///
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
#[wasm_bindgen(method, catch)]
pub fn apply(this: &Function, context: &JsValue, args: &Array) -> Result<JsValue, JsValue>;