JSBool JS_ExecuteScript()
Usage
JS_ExecuteScript (JSContext *cx, JSObject *obj, unsigned short *script,
unsigned int sz, jsval *rval)
Description
Method; compiles and executes a JavaScript string. If the script generates a return value, it returns
in
.
*rval
Arguments
JSContext *cx
•
The
argument is the opaque
cx
•
The
argument is a pointer to the object in whose context the script executes. While the
obj
script is running, the
that passes to the JavaScript function.
•
The
argument is a string that contains JavaScript code. If the string size is not specified
script
(see the
argument), the string must be null-terminated.
sz
•
The
argument is the size of the string, in bytes. If sz is 0, the length of the null-terminated
sz
string is computed automatically.
•
The
argument is a pointer to a single
rval
stored in
*rval
Returns
A Boolean value:
,
,
JSObject *obj
unsigned short *script
JSContext
keyword is equal to this object. Usually this is the
this
.
indicates success;
JS_TRUE
,
unsigned int sz
pointer that passes to the JavaScript function.
structure. The function's return value is
jsval
indicates failure.
JS_FALSE
,
jsval *rval
pointer
JSObject
The C-level API
385
Need help?
Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?