JSBool JS_ValueToDouble()
Description
This function extracts a function argument from a jsval structure, converts it to a double (if possible), and passes the converted value back to the caller.
Arguments
JSContext *cx, jsval v, double *dp
- The
cxargument is the opaqueJSContextpointer that passed to the JavaScript function. - The
vargument is thejsvalstructure from which the double is to be extracted. - The
dpargument is a pointer to an 8-byte double. This function stores the converted value in*dp.
Returns
A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.