Mozilla's getting a new look. What do you think? https://mzl.la/brandsurvey

JSVAL IS NULL

Determine if a given jsval is null.

Syntax

JSVAL_IS_NULL(v)

Description

JSVAL_IS_NULL(v) is true if v is JSVAL_NULL, which is the JavaScript null value.

(Note: JSVAL_IS_OBJECT(JSVAL_NULL) is also true.)

Example

The following code snippet illustrates how a JavaScript variable, MyItem, is conditionally tested in an if statement to see if it contains a null value.

if (JSVAL_IS_NULL(MyItem)) {
    ...
}

MXR ID Search for JSVAL_IS_NULL

Document Tags and Contributors

 Last updated by: Jorend,