User Guide

550 C-Level Extensibility
unsigned short *JS_ObjectType()
Usage
unsigned short *JS_ObjectType(JSObject *obj);
Description
Method; given an object reference, returns the class name of the object. For example, if the
object is a DOM object, the function returns "
Document". If the object is a node in the
document, the function returns "
Element". For an array object, the function returns "Array".
Arguments
JSObject *obj
Typically, this argument is passed in and converted using the JS_ValueToObject()
function.
Returns
A pointer to a null-terminated string. The caller should not free this string when it finishes.
JSObject *JS_NewArrayObject()
Usage
JSObject *JS_NewArrayObject( JSContext *cx, unsigned int length [, jsval *v
] )
Description
Method; creates a new object that contains an array of JSVals.
NOTE
Do not modify the returned buffer pointer, or you might corrupt the data structures of the
JavaScript interpreter.