| |||||||||||||||
SummaryInstantiates a new object. | |||||||||||||||
SyntaxJSObject * JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent);
| |||||||||||||||
DescriptionJS_NewObject instantiates a new object based on a specified class, prototype, and parent object. cx is a pointer to a context associated with the runtime in which to establish the new object. clasp is a pointer to an existing class to use for internal methods, such as finalize. proto is an optional pointer to the prototype object with which to associate the new object.
Set proto to
On success,
| |||||||||||||||
NotesTo create a new object that is a property of an existing object, useJS_DefineObject.
| |||||||||||||||
See Also
|