Function javascriptcore_sys::JSObjectMakeFunctionWithCallback [] [src]

pub unsafe extern "C" fn JSObjectMakeFunctionWithCallback(
    ctx: JSContextRef,
    name: JSStringRef,
    callAsFunction: JSObjectCallAsFunctionCallback
) -> JSObjectRef

Convenience method for creating a JavaScript function with a given callback as its implementation.

Returns a JSObject that is a function. The object's prototype will be the default function prototype.