JS GetPrototype

Retrieves an object's prototype.


JSObject * JS_GetPrototype(JSObject *obj);
Name Type Description
obj JSObject * Object for which to retrieve the prototype.


JS_GetPrototype retrieves the prototype of a specified object, obj. A prototype object provides properties inherited by similar JS objects. This is the equivalent of obj.__proto__ from javascript.

If obj has a prototype, JS_GetPrototype returns a pointer to the prototype. Otherwise, it returns NULL.

To set an object's prototype, use JS_SetPrototype.

MXR ID Search for JS_GetPrototype

Document Tags and Contributors

 Last updated by: Jorend,