logo
pub type NativeFunctionSignature = fn(_: &JsValue, _: &[JsValue], _: &mut Context) -> JsResult<JsValue>;
Expand description

Type representing a native built-in function a.k.a. function pointer.

Native functions need to have this signature in order to be callable from Javascript.

Arguments

  • The first argument represents the this variable of every Javascript function.

  • The second argument represents a list of all arguments passed to the function.

  • The last argument is the Context of the engine.