552
C-Level Extensibility
JSBool JS_GetElement()
Usage
JSBool JS_GetElement(JSContext *cx, JSObject *obj, jsint idx, jsval *vp)
Description
Method; reads a single element of an array object.
Arguments
JSContext
*cx
,
JSObject
*obj
,
unsigned int
index
,
jsval
*v
■
The
cx
argument is the opaque
JSContext
pointer that passes to the JavaScript function.
■
The
obj
argument is a pointer to an array object.
■
The
index
argument is an integer index into the array. The first element is index 0, and
the last element is index (
length - 1
).
■
The
v
argument is a pointer to a
jsval
where the contents of the
jsval
structure in the
array should be copied.
Returns
A Boolean value:
JS_TRUE
indicates success;
JS_FALSE
indicates failure.
JSBool JS_SetElement()
Usage
JSBool JS_SetElement(JSContext *cx, JSObject *obj, jsint idx, jsval *vp)
Description
Method; writes a single element of an array object.
Arguments
JSContext *cx, JSObject *obj, unsigned int index, jsval *v
■
The
cx
argument is the opaque
JSContext
pointer that passes to the JavaScript function.
■
The
obj
argument is a pointer to an array object.
■
The
index
argument is an integer index into the array. The first element is index
0
, and
the last element is index (
length - 1
).
■
The
v
argument is a pointer to a
jsval
structure whose contents should be copied to the
jsval
in the array.
Содержание FLASH 8-EXTENDING FLASH
Страница 1: ...Extending Flash...
Страница 38: ...38 Top Level Functions and Methods...
Страница 532: ...532 Objects...
Страница 554: ...554 C Level Extensibility...