Visit Mozilla.org

JS GetParent

From MDC

Get the parent object of a given object.

[edit] Syntax

JSObject * JS_GetParent(JSContext *cx, JSObject *obj);
Name Type Description
cx JSContext * The context in which to get the parent.
obj JSObject * Object for which to retrieve the parent.

[edit] Description

JS_GetParent retrieves the parent object of obj (obj.__parent__), or NULL if obj does not have a parent.

To set an object's parent, use JS_SetParent. To get an object's constructor property, use JS_GetConstructor.

LXR ID Search for JS_GetParent