class KJScript
|
ECMAScript interpreter. More... |
|
|
Public Methods
Public Static Methods
Detailed Description
This library implements ECMAScript. Currently its main aim is to add
JavaScript support to KHTMLView.
Create a new ECMAScript interpreter. You can later ask it to interprete
code by pass it via evaluate.
Parameters:
w | is pointing to the KHTMLView you wish the script to operate on.
|
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:
code | is a string containing the code to be executed.
|
bool evaluate (const KJS::UChar *code, unsigned int length)
|
Same as above. Only differing in the arguments accepted.
KJS::UChar is a data type compatible to XChar2b and QChar.
Parameters:
code | is an Unicode string containing the code to be executed.
|
length | of the string.
|
Added for convenience in case you have the code in available in
internal representation already.
Parameters:
code | is an Unicode string containing the code to be executed.
|
Clear the interpreter's memory. Otherwise, function declarations
and global variables will be remembered after each invokation of
KJScript::evaluate.
Generated by: dfaure@faure on Sun Mar 26 14:25:02 2000, using kdoc 2.0a35. |