| 
 | 
Summary
Determines the scope of access to an object.
 | 
Syntax
JSBool JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id,
    JSAccessMode mode, jsval *vp, uintN *attrsp);
 
 | 
Description
JS_CheckAccess determines the scope of access to an object, obj, and its scope chain. Checking occurs in a specified JSContext, cx.id is the JS ID of a property belonging to the object. mode determines the scope of the access check, and can be one or more of the following enumerated values OR'd:
 
 - 
JSACC_PROTO: Permission is granted to check both the object itself and its underlying propotype object. 
- 
JSACC_PARENT: Permission is granted to check both the object itself and its underlying parent object. 
- 
JSACC_IMPORT: Permission is granted to check an imported object. 
- 
JSACC_WATCH: Permission is granted to check a debugger watch object. 
 
On success, JS_CheckAccess returns JS_TRUE, vp points to the current value of the specified property, identified by id, and attrsp points to the value of the attribute flag for that property. On failure, JS_CheckAccess returns JS_FALSE, and both vp and attrsp are undefined.
  | 
See Also
 |