Skip to main content

NativeFn

Type Alias NativeFn 

Source
pub type NativeFn = fn(&mut Interp<'_>, Value, &[Value]) -> JsResult<Value>;
Expand description

A native (Rust) function reachable from JavaScript.

It receives the interpreter so a builtin can allocate (which needs the heap), call back into JavaScript (which needs the frame stack) and raise exceptions.