Entry: JS_GetElement (Function)
Summary: Finds specified element or numeric property associated with an object or the object's class and retrieves its current value.
Syntax:
JSBool JS_GetElement(JSContext *cx, JSObject *obj, jsint index,
jsval *vp);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
obj JSObject * Array object to search on for the element.
index jsint Index number of the element to look up.
vp jsval * Pointer to a variable into which to store the current value of the element if it has a value. If not, vp is set to JSVAL_VOID.
Description:
JS_GetElement examines a specified JS object, obj, its scope and prototype links, for an element or numeric property numbered index.
If the element exists, JS_GetElement sets vp to the current value of the element if it has a value, or to JSVAL_VOID if it does not, and returns JS_TRUE. If an error occurs during the search, JS_GetElement returns JS_FALSE, and vp is undefined.
See also:
|
|
|