aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi/qjsengine.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-08-15 16:43:13 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-16 11:05:28 +0000
commitb8e9ce6b4ecda30ad838c1d3465c428591071a66 (patch)
tree0d9ef453895e305aacd0c90eed89ba8bf0de7b04 /src/qml/jsapi/qjsengine.h
parent67c33f2230e899a230260879a5d90dfcd8e13d8d (diff)
Add API to QJSEngine for importing ECMAScript modules
Now that the standard defines the concept of a module, it makes sense to offer a function in QJSEngine that can read files and load them. [ChangeLog][QtQml][QJSEngine] Added function to import ECMASCript modules from the file system or the Qt resource system. Change-Id: I72f8d49de948872221ac1b54fcfb066404bed9b9 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qml/jsapi/qjsengine.h')
-rw-r--r--src/qml/jsapi/qjsengine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h
index 36a3e475f2..5c8613ffd6 100644
--- a/src/qml/jsapi/qjsengine.h
+++ b/src/qml/jsapi/qjsengine.h
@@ -69,6 +69,8 @@ public:
QJSValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1);
+ QJSValue importModule(const QString &fileName);
+
QJSValue newObject();
QJSValue newArray(uint length = 0);