Function js::jsapi::NewFunctionFromSpec [] [src]

pub unsafe extern "C" fn NewFunctionFromSpec(
    cx: *mut JSContext,
    fs: *const JSFunctionSpec,
    id: HandleId
) -> *mut JSFunction

Create a new function based on the given JSFunctionSpec, *fs. id is the result of a successful call to PropertySpecNameToPermanentId(cx, fs->name, &id).

Unlike JS_DefineFunctions, this does not treat fs as an array. *fs must not be JS_FS_END.