|
|
|
Create a new ECMAScript interpreter. You can later ask it to interprete code by passing it via evaluate.
~ |
Destructor
bool |
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:
Returns: True if the code was evaluated successfully, false if an error occured.
bool |
Same as above. Only differing in the arguments accepted.
Parameters:
bool |
Added for convenience in case you have the code in available in internal representation already.
Parameters:
void |
Clear the interpreter's memory. Otherwise, function declarations and global variables will be remembered after each invokation of KJScript::evaluate.
KJS::Imp * |
[const]
Returns: Return value from the last call to evaluate(). Null if there hasn't been any.
int |
[const]
Returns: Return code from last call to evaluate(). 0 on success.
const char * |
[const]
Returns: Error message from last call to evaluate(). Empty string if no error occured.
void |
Adds a debug() function to the set of pre-defined properties. debug(arg) tries to convert 'arg' to a string and prints the result to stderr. If you want to debug self defined Host Objects this way you should provide them with a toString() method that returns a string.
Generated by: prospector@porky.devel.redhat.com on Fri Nov 3 09:59:15 2000, using kdoc 2.0a42. |