long JS_GetArrayLength()
Description
Given a pointer to an array object, this function gets the number of elements in the array.
Arguments
JSContext *cx, JSObject *obj
- The
cxargument is the opaqueJSContextpointer that passes to the JavaScript function. - The
objargument is a pointer to an array object.
Returns
The number of elements in the array or -1 upon failure.