class KJScript

ECMAScript interpreter. More...

Definition#include <kjs.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

This library implements ECMAScript. Currently its main aim is to add JavaScript support to KHTMLWidget.

KJScript ()

Create a new ECMAScript interpreter. You can later ask it to interprete code by pass it via evaluate.

Parameters:
wis pointing to the KHTMLWidget you wish the script to operate on.

~KJScript ()

Destructor

bool evaluate (const char *code)

Asks the interpreter to evaluate a piece of code. If called more than once the state (global variables, functions etc.) will be preserved between each call.

Parameters:
codeis a string containing the code to be executed.

bool evaluate (const KJS::UnicodeChar *code, unsigned int length)

Same as above. Only differing in the arguments accepted. KJS::UnicodeChar is a data type compatible to XChar2b and QChar.

Parameters:
codeis an Unicode string containing the code to be executed.
lengthof the string.

bool useModule (const char *module, void *arg = 0L)

Load and initialize an extension module.

Parameters:
moduleis the name of the module. If an absolute path is passed the directories specified in /etc/od.so.conf and LD_LIBRARY_PATH will be searched. If neither an absolute path nor an extension is given .la will be appended by default.
Anoptional argument to initialize the module.


Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:38 2000, using kdoc 2.0a33.