JavaScript-1.5 Reference

JS_GetPrototype Function

Summary

Retrieves an object's prototype.

Syntax

JSObject * JS_GetPrototype(JSContext *cx, JSObject *obj);
NameTypeDescription
cxJSContext *Pointer to a JS context from which to derive runtime information.
objJSObject *Object for which to retrieve the prototype.

Description

JS_GetPrototype retrieves the prototype object for a specified object, obj. A prototype object provides properties shared by similar JS objects.

If an object has a prototype, JS_GetPrototype returns a pointer to the prototype. If the object does not have a prototype, or the object finalize function is active, JS_GetPrototype returns NULL.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JS_SetPrototype ]

This page was generated by APIDOC