Entry: JS_CallFunctionName (Function)
Summary: Calls a function-valued property belonging to an object.
Syntax:
JSBool JS_CallFunctionName(JSContext *cx, JSObject *obj,
const char *name, uintN argc, jsval *argv, jsval *rval);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
obj JSObject * The object containing the method to execute.
name const char * The name of the function to execute.
argc uintN Number of arguments you are passing to the function.
argv jsval * Pointer to the array of argument values to pass to the function.
rval jsval * Pointer to a variable to hold the return value from the function call.
Description:
JS_CallFunctionName executes a function-valued property, name, belonging to a specified JS object, obj.
In argc, indicate the number of arguments passed to the function. In argv, pass a pointer to the actual argument values to use. There should be one value for each argument you pass to the function; the number of arguments you pass may be different from the number of arguments defined for the function.by the function.
rval is a pointer to a variable that will hold the function's return value, if any, on successful function execution.
If the called function executes successfully, JS_CallFunctionName returns JS_TRUE. Otherwise it returns JS_FALSE, and rval is undefined.
See also:
|
|
|