Adobe 38040334 - Dreamweaver CS3 User Manual page 360

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

• The
argument is an integer index into the array. The first element is
index
(
).
length - 1
• The
argument is a pointer to a
v
Returns
A Boolean value:
JS_TRUE
JSBool JS_ExecuteScript()
Description
This function compiles and executes a JavaScript string. If the script generates a return value, it returns in
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 the script is running, the
obj
keyword is equal to this object. Usually this is the
this
• The
argument is a string that contains JavaScript code. If the string size is not specified (see the
script
argument), the string must be null-terminated.
• The
argument is the size of the string, in bytes. If
sz
automatically.
• The
argument is a pointer to a single
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
script error to give the user information about why the script failed (for 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 the caller should free the
error
string when it is not needed. If the string size is not specified (see the
nated.
• The
argument is the size of the string, in bytes. If
sz
automatically.
Returns
A Boolean value:
JS_TRUE
structure whose contents should be copied to the
JSVal
indicates success;
JS_FALSE
,
,
char *script
unsigned int sz
pointer that passes to the JavaScript function.
JSContext
structure. The function's return value is stored in
JSVal
indicates success;
JS_FALSE
,
size_t sz
pointer that passes to the JavaScript function.
JSContext
indicates success;
JS_FALSE
index
indicates failure.
,
JSVal *rval
pointer that passes to the JavaScript function.
JSObject
is 0, the length of the null-terminated string is computed
sz
indicates failure.
argument), the string must be null-termi-
sz
is 0, the length of the null-terminated string is computed
sz
indicates failure.
DREAMWEAVER CS3
Extending Dreamweaver
0, and the last element is
index
in the array.
JSVal
*rval
sz
.
*rval
for a
JS_FALSE
354
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents