Entry: JSVAL_IS_OBJECT (Macro)
Summary: Determines if a specified value is a JS object.
Syntax:
JSVAL_IS_OBJECT(v)
Description:
Use JSVAL_IS_OBJECT to determine if a given JS value, v, is a JS object or NULL. If the type tag for v is JSVAL_OBJECT, JSVAL_IS_OBJECT evaluates to true. Otherwise, it evaluates to false. These return types are C values, not JS Boolean values.
Example:
The following code snippet illustrates how a JavaScript variable, MyItem, is conditionally tested in an if statement to see if it is a JS object.
if (JSVAL_IS_OBJECT(MyItem)) {
. . .
}
See also:
|
|
|