This article needs a technical review. How you can help.
Retrieves an object's prototype.
bool JS_GetPrototype(JSContext *cx, JS::HandleObject obj, JS::MutableHandleObject protop);
||Pointer to a JS context from which to derive runtime information. Requires request. In a
||Object for which to retrieve the prototype.|
||Out parameter. If successful, Receives prototype object of
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
false, that signals an exception, which should be handled as usual. Otherwise, it stores a pointer to the prototype or null to
*protop and returns
To set an object's prototype, use