AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JS_ValueToFunction (Function)
Summary:     Converts a JS value to a JS function.
Syntax:
JSFunction * JS_ValueToFunction(JSContext *cx, jsval v);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     v     jsval     The JS value to convert.
                 
Description:
JS_ValueToFunction converts a specified JS value, v, to a JS function. The actual conversion is performed by the object's convert operation. JS_ValueToFunction returns a pointer to the converted function.

Converting a JS value to a function succeeds if the value is an object for which a function class has been defined, or if the JS value is already a function. If conversion fails, JS_ValueToFunction returns NULL.


See also:
JS_ConvertArguments
JS_ConvertValue
JS_GetTypeName
JS_TypeOfValue
JS_ValueToBoolean
JS_ValueToInt32
JS_ValueToNumber
JS_ValueToObject
JS_ValueToString

[sh-index] Back to list of manuals