mozilla
Your Search Results

    JS_IdToValue

    This article is in need of a technical review.

    Convert a JS ID to a JS value.

    Syntax

    bool
    JS_IdToValue(JSContext *cx, jsid id, JS::MutableHandle<JS::Value> 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 JS::MutableHandle<JS::Value> 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 true. Otherwise it returns false.

    The inverse of JS_IdToValue is JS_ValueToId.

    See Also

    Document Tags and Contributors

    Contributors to this page: fscholz, Jorend, Nickolay, Dria, MMondor, Tservo, kscarfone, arai
    Last updated by: kscarfone,
    Hide Sidebar