JavaScript-1.5 Reference

JS_GetPropertyAttributes Function

Summary

Retrieves the attributes of a specified property.

Syntax

JSBool JS_GetPropertyAttributes(JSContext *cx, JSObject *obj,
    const char *name, uintN *attrsp, JSBool *foundp);
NameTypeDescription
cxJSContext *Pointer to a JS context from which to derive runtime information.
objJSObject *Object from which to retrieve property attributes.
nameconst char *Name of the property from which to retrieve attributes.
uintNattrsp *Pointer to the storage area into which to place retrieves attributes.
foundpJSBool *Flag indicating whether or not the specified property was located.

Description

JS_GetPropertyAttributes retrieves the attributes for a specified property, name. cx is the context, and obj is a pointer to the object that owns the property. attrsp is a pointer to the unsigned integer storage area into which to retrieve the attributes.

If JS_GetPropertyAttributes cannot locate an object with the specified property, it returns JS_FALSE, and both attrsp and foundp are undefined.

If the specified property or the specified object does not exist, foundp is set to JS_FALSE. If the property exists, but belongs to another object, JS_GetPropertyAttributes then returns JS_FALSE, and attrsp is undefined. If the property exists and it belongs to the object you specify, then foundp is set to JS_TRUE. If JS_GetPropertyAttributes can actually read the current property values, it returns JS_TRUE. Otherwise, it returns JS_FALSE.

See Also

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

This page was generated by APIDOC