Function jscjs_sys::api::JSObjectMakeFunctionWithCallback [−][src]
pub unsafe extern "C" fn JSObjectMakeFunctionWithCallback(
ctx: JSContextRef,
name: JSStringRef,
callAsFunction: JSObjectCallAsFunctionCallback
) -> JSObjectRef
Expand description
@function @abstract Convenience method for creating a JavaScript function with a given callback as its implementation. @param ctx The execution context to use. @param name A JSString containing the function’s name. This will be used when converting the function to string. Pass NULL to create an anonymous function. @param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called. @result A JSObject that is a function. The object’s prototype will be the default function prototype.