MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 469

Extending dreamweaver
Table of Contents

Advertisement

JSBool JS_ExecuteScript()
Description
This function compiles and executes a JavaScript string. If the script generates a return value,
it returns in
.
*rval
Arguments
,
JSContext *cx
JSObject *obj
The
argument is the opaque
cx
The
argument is a pointer to the object in whose context the script executes. While
obj
the script is running, the
pointer that passes to the JavaScript function.
JSObject
The
argument is a string that contains JavaScript code. If the string size is not
script
specified (see the
The
argument is the size of the string, in bytes. If sz is 0, the length of the null-
sz
terminated string is computed automatically.
The
argument is a pointer to a single
rval
stored in
.
*rval
Returns
A Boolean value:
JS_TRUE
JSBool JS_ReportError()
Description
This function describes the reason for a script error. Call this function before returning the
value
for a script error to give the user information about why the script failed (for
JS_FALSE
example, "wrong number of arguments").
Arguments
,
JSContext *cx
char *error
The
argument is the opaque
cx
The
argument is a string that contains the error message. The string is copied, so
error
the caller should free the string when it is not needed. If the string size is not specified (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-
sz
terminated string is computed automatically.
,
char *script
JSContext
keyword is equal to this object. Usually this is the
this
argument), the string must be null-terminated.
sz
indicates success;
,
size_t sz
JSContext
,
unsigned int sz
pointer that passes to the JavaScript function.
structure. The function's return value is
jsval
indicates failure.
JS_FALSE
pointer that passes to the JavaScript function.
,
jsval *rval
The C-level API
469

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

This manual is also suitable for:

Dreamweaver 8

Table of Contents