Create a new function based on the given JSFunctionSpec.
JSFunction* JS::NewFunctionFromSpec(JSContext* cx, const JSFunctionSpec* fs, HandleId id);
||The context in which to define functions. Requires request. In a
||A pointer to function specification.|
||The result of a successful call to
JS::NewFunctionFromSpec creates a new function based on the given
id is the result of a successful call to
PropertySpecNameToPermanentId(cx, fs->name, &id).
JS_DefineFunctions, this does not treat
fs as an array.
*fs must not be
JS::NewFunctionFromSpec returns a pointer to newly created function. On error, it returns