Mozilla.com

Table of contents
  1. 1. Syntax
  2. 2. Description
  3. 3. See Also
Table of contents
  1. 1. Syntax
  2. 2. Description
  3. 3. See Also

Determines the JS data type of a JS value.

Syntax

JSType JS_TypeOfValue(JSContext *cx, jsval v);
Name Type Description
cx JSContext * The context in which to perform the type check. Requires request. (In a JS_THREADSAFE build, the caller must be in a request on this JSContext.)
v jsval The value to examine.

Description

JS_TypeOfValue examines a specified JS value, v, and returns its JS data type. The return value is always one of JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_BOOLEAN.

Page last modified 20:07, 5 Sep 2008 by Jorend

Files (0)