Please note, this is a STATIC archive of website from 03 Nov 2016, does not collect or store any user information, there is no "phishing" involved.


Obsolete since JSAPI 32
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.

Cast a jsval to a JSObject * without a type check.


JSObject *


JSVAL_TO_OBJECT casts the argument, v, to type JSObject *. As a precondition, JSVAL_IS_OBJECT(v) must be true. That is, v must be either a reference to an object or JSVAL_NULL. This function is not type-safe: if v is not an object or JSVAL_NULL, the behavior is undefined.

To convert a value to an object, use the JS_ValueToObject function, which has well-defined behavior even when the argument is not an object or null.

See Also

Document Tags and Contributors

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