Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

OBJECT_TO_JSVAL

Obsolete since JSAPI 42
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Casts a specified JS object to a JS value.

Please use JS::ObjectValue/JS::ObjectOrNullValue instead in SpiderMonkey 45 or later.

Syntax

jsval
OBJECT_TO_JSVAL(JSObject *obj);
Name Type Description
obj JSObject * A pointer to a JavaScript object to convert to a jsval.

Description

OBJECT_TO_JSVAL casts obj from type JSObject * to jsval. If obj is NULL, the result is JSVAL_NULL.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, ethertank, Jorend, Rappo
 Last updated by: arai,