wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

fix - js_sys::Function::apply expects &JsValue as the first argument

Open wkaisertexas opened this issue 7 months ago • 0 comments

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>;

wkaisertexas avatar Apr 08 '25 20:04 wkaisertexas