JavaScript-1.5 Reference

JS_GetTypeName Macro

Summary

Function. Returns a pointer to the string literal description of a specified JS data type.

Syntax

const char * JS_GetTypeName(JSContext *cx, JSType type);
NameTypeDescription
cxJSContext *Pointer to a JS context from which to derive runtime information.
typeJSTypeThe JS value to examine. type is one of JSTYPE_VOID, JSTYPE_OBJECT, JSTYPE_FUNCTION, JSTYPE_STRING, JSTYPE_NUMBER, or JSTYPE_BOOLEAN.

Description

JS_GetTypeName returns a pointer to a string literal description of a specified JS data type, type. The following table lists JSTypes and the string literals reported by JS_GetTypeName:
Type Literal

JSTYPE_VOID

"undefined"

JSTYPE_OBJECT

"object"

JSTYPE_FUNCTION

"function"

JSTYPE_STRING

"string"

JSTYPE_NUMBER

"number"

JSTYPE_BOOLEAN

"boolean"

Any other value

NULL

See Also

Groups [ Macro ]
Documents [ LXR ID Search ]
Entries [ JS_ConvertValue | JS_TypeOfValue | JS_ValueToBoolean | JS_ValueToFunction | JS_ValueToInt32 | JS_ValueToNumber | JS_ValueToObject | JS_ValueToString ]

This page was generated by APIDOC