MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spécifications Page 461

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 504
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 460
The C-level API 461
The C-level API
The C-level extensibility API consists of the following functions:
typedef JSBool (*JSNative)(JSContext *cx,
JSObject *obj, unsigned int argc, jsval *argv, jsval
*rval)
Description
This function signature describes C-level implementations of JavaScript functions in the
following situations:
The cx pointer is a pointer to an opaque JSContext structure, which must be passed to
some of the functions in the JavaScript API. This variable holds the interpreter’s execution
context.
The obj pointer is a pointer to the object in whose context the script executes. While the
script is running, the
this keyword is equal to this object.
The argc integer is the number of arguments being passed to the function.
The argv pointer is a pointer to an array of jsval structures. The array is argc elements
in length.
The rval pointer is a pointer to a single jsval structure. The functions return value
should be written to
*rval.
The function returns
JS_TRUE if successful; JS_FALSE otherwise. If the function returns
JS_FALSE, the current script stops executing and an error message appears.
JSBool JS_DefineFunction()
Description
This function registers a C-level function with the JavaScript interpreter in Dreamweaver.
After the
JS_DefineFunction() function registers the C-level function that you specify in
the
call argument, you can invoke it in a JavaScript script by referring to it with the name
that you specify in the
name argument. The name is case-sensitive.
Typically, this function is called from the
MM_Init() function, which Dreamweaver calls
during startup.
Vue de la page 460
1 2 ... 456 457 458 459 460 461 462 463 464 465 466 ... 503 504

Commentaires sur ces manuels

Pas de commentaire