Extending Flash |
|
|
|
| C-Level Extensibility > The C-level API > JSBool JS_ValueToObject() | |||
JSBool JS_ValueToObject(JSContext *cx, jsval v, JSObject **op);
Method; extracts a function argument from a jsval structure, converts it to an object (if possible), and passes the converted value back to the caller. If the object is an array, use JS_GetArrayLength() and JS_GetElement() to read its contents.
JSContext *cx, jsval v, JSObject **op
cx argument is the opaque JSContext pointer that passes to the JavaScript function.v argument is the jsval structure from which the object is to be extracted.op argument is a pointer to a JSObject pointer. This function stores the converted value in *op.A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
|
|
|
|