Skip to content

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

New issue

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

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

Already on GitHub? # 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>;

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

Successfully merging this pull request may close these issues.

1 participant