JavaScript-1.5 Reference

JSVAL_IS_BOOLEAN Macro

Summary

Determines if a specified value is a JS Boolean data type.

Syntax

JSVAL_IS_BOOLEAN(v)

Description

Use JSVAL_IS_BOOLEAN to determine if a given value, v, is a JS Boolean value. If the type tag for v is JSVAL_BOOLEAN, JSVAL_IS_BOOLEAN 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 Boolean data type.
if (JSVAL_IS_BOOLEAN(MyItem)) {
    . . .
}

See Also

Groups [ Macro ]
Documents [ LXR ID Search ]
Entries [ JSVAL_IS_DOUBLE | JSVAL_IS_INT | JSVAL_IS_NULL | JSVAL_IS_NUMBER | JSVAL_IS_OBJECT | JSVAL_IS_PRIMITIVE | JSVAL_IS_STRING | JSVAL_IS_VOID ]

This page was generated by APIDOC