AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JS_CheckAccess (Function)
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 JSContextcx.

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:

ulPLI CODEJSACC_PROTO/CODE: Permission is granted to check both the object itself and its underlying propotype object./LI PLI CODEJSACC_PARENT/CODE: Permission is granted to check both the object itself and its underlying parent object./LI PLI CODEJSACC_IMPORT/CODE: Permission is granted to check an imported object./LI PLI CODEJSACC_WATCH/CODE: Permission is granted to check a debugger watch object./LI /ul On success, JS_CheckAccess returns JS_TRUEvp 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.


[sh-index] Back to list of manuals