15 TJSLoader(
const QString &moduleName, AltJS alt = Default);
16 TJSLoader(
const QString &defaultMember,
const QString &moduleName, AltJS alt = Default);
19 void import(
const QString &moduleName);
20 void import(
const QString &defaultMember,
const QString &moduleName);
21 TJSInstance loadAsConstructor(
const QJSValue &arg)
const;
22 TJSInstance loadAsConstructor(
const QJSValueList &args = QJSValueList())
const;
24 void setSearchPaths(
const QStringList &paths);
25 static void setDefaultSearchPaths(
const QStringList &paths);
26 static QStringList defaultSearchPaths();
27 static QString compileJsx(
const QString &jsx);
30 QJSValue importTo(
TJSModule *context,
bool isMain)
const;
31 QString search(
const QString &moduleName, AltJS alt)
const;
32 QString absolutePath(
const QString &moduleName,
const QDir &dir, AltJS alt)
const;
33 void replaceRequire(
TJSModule *context, QString &content,
const QDir &dir)
const;
39 QStringList _searchPaths;
40 QList<QPair<QString, QString>> _importFiles;
The TJSInstance class acts as a instance for JavaScript data types.
Definition: tjsinstance.h:7
The TJSLoader class loads a JavaScript module in server side.
Definition: tjsloader.h:8
AltJS
Definition: tjsloader.h:10
@ Jsx
Definition: tjsloader.h:12
The TJSModule class represents a module for evaluating JavaScript code.
Definition: tjsmodule.h:15
#define T_CORE_EXPORT
Definition: tdeclexport.h:28