JS IdToValue

Converts a JS ID to a JS value.

Syntax

JSBool JS_IdToValue(JSContext *cx, jsid id, jsval *vp);
Name Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.
id jsid The property identifier to convert.
vp jsval * Out parameter. On success, *vp receives the converted value.

Description

JS_IdToValue converts a specified JS ID, id, to a JS value. On success, JS_IdToValue stores the converted value in *vp and returns JS_TRUE. Otherwise it returns JS_FALSE.

The inverse is JS_ValueToId.

MXR ID Search for JS_IdToValue

Document Tags and Contributors

Contributors to this page: Jorend
Last updated by: Jorend,