JavaScript-1.5 Reference

JS_LookupUCProperty Function

Summary

Determines if a specified, Unicode-encoded property exists.

Syntax

JSBool JS_LookupUCProperty(JSContext *cx, JSObject *obj,
    const jschar *name, size_t namelen, jsval *vp);
NameTypeDescription
cxJSContext *Pointer to a JS context from which to derive runtime information.
objJSObject *Object to search on for the property.
nameconst jschar *Name of the property to look up.
namelensize_tLength, in bytes, of name.
vpjsval *Pointer to a variable into which to store the last retrieved value of the property if it exists. If not, vp is set to JSVAL_VOID.

Description

JS_LookupUCProperty examines a specified JS object, obj, for a Unicode-encoded property named name. namelen indicates the size, in bytes, of name. If the property exists, vp is set either to the last retrieved value of the property if it exists, or to JSVAL_VOID if it does not, and JS_LookupProperty returns JS_TRUE. On error, such as running out of memory during the search, JS_LookupProperty returns JS_FALSE, and vp is undefined.

Notes

JS_LookupUCProperty does not distunguish between a property with a value of undefined and a property that does not exist.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JSVAL_VOID | JS_AliasProperty | JS_DefineProperty | JS_DefinePropertyWithTinyId | JS_DefineUCProperty | JS_DefineUCPropertyWithTinyID | JS_DeleteProperty | JS_GetProperty | JS_LookupProperty | JS_PropertyStub | JS_SetProperty ]

This page was generated by APIDOC