Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wkaisertexas
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant