KJS-API
kjsapitest.cpp
Go to the documentation of this file.
bool hasException() const
Returns true if this context has an unhandled exception.
Definition: kjscontext.cpp:36
KJSObject throwException(const QString &message) const
Throws a general exception with the specified error message.
Definition: kjscontext.cpp:41
void defineProperty(KJSContext *ctx, const QString &name, PropertyGetter getter, PropertySetter setter=0)
Defines a property of this prototype with C++ callback functions for getting and setting the property...
Definition: kjsprototype.cpp:286
KJSGlobalObject constructGlobalObject(void *internalValue=0)
Similar to constructObject() but specialized on the construction of global objects.
Definition: kjsprototype.cpp:278
static struct O o0
A class representing a global object of an execution environment.
Definition: kjsobject.h:280
KJSContext * globalContext()
Returns a handle to the global execution context.
Definition: kjsinterpreter.cpp:148
static void setX(KJSContext *context, void *object, KJSObject value)
Definition: kjsapitest.cpp:196
bool toBoolean(KJSContext *ctx)
Returns this value converted to a boolean.
Definition: kjsobject.cpp:160
void defineFunction(KJSContext *ctx, const QString &name, FunctionCall callback)
Define a function.
Definition: kjsprototype.cpp:299
void setProperty(KJSContext *ctx, const QString &name, const KJSObject &value)
Sets the specified property on this object.
Definition: kjsobject.cpp:206
KJSObject at(int idx) const
Returns the argument at the specified index.
Definition: kjsarguments.cpp:31
double toNumber(KJSContext *ctx)
Returns this value converted to a number.
Definition: kjsobject.cpp:167
bool isException() const
Returns true if the script evaluation has caused an exception.
Definition: kjsinterpreter.cpp:73
void defineConstant(const QString &name, double value)
Add a read-only numerical property to this object.
Definition: kjsprototype.cpp:239
QString toString(KJSContext *ctx)
Returns this value converted to a string.
Definition: kjsobject.cpp:181
KJSResult evaluate(const QString &sourceURL, int startingLineNumber, const QString &code, KJSObject *thisValue=0)
Evaluates a piece of code with a "this" set to (optionally set) value.
Definition: kjsinterpreter.cpp:163
static KJSObject multiply(KJSContext *context, void *object, const KJSArguments &arguments)
Definition: kjsapitest.cpp:226
KJSObject property(KJSContext *ctx, const QString &name)
Reads the specified property from this object.
Definition: kjsobject.cpp:188
static bool normalizeCode(const QString &codeIn, QString *codeOut, int *errLine=0, QString *errMsg=0)
Reformat the given script code to an easy to read format with only one statement per line...
Definition: kjsinterpreter.cpp:203
KJSObject globalObject()
Returns the object that is used as the global object during all script execution performed by this in...
Definition: kjsinterpreter.cpp:156
KJSObject constructObject(KJSContext *ctx, void *internalValue=0)
Construct an object with this prototype and the specified internal value.
Definition: kjsprototype.cpp:263
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.