summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@theqtcompany.com>2015-03-10 13:52:41 +0100
committerRobin Burchell <robin.burchell@viroteck.net>2015-03-29 10:45:57 +0000
commitaf45af254b6cc80b15a5f768785ca2862fadbfe4 (patch)
tree0f9397e0fc3e30ba8db1fb2b7473a2479def4ec1 /src/webengine
parent42174782d05c83ac89e6512029a5f9b61dc22495 (diff)
QQuickWebEngineScript: First stab at documenting sourceUrl and sourceCode.
Change-Id: I9674488a95e3d0293c52b854201bb840392a641f Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebenginescript.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebenginescript.cpp b/src/webengine/api/qquickwebenginescript.cpp
index eb3a41dd5..affffbf46 100644
--- a/src/webengine/api/qquickwebenginescript.cpp
+++ b/src/webengine/api/qquickwebenginescript.cpp
@@ -84,12 +84,33 @@ QString QQuickWebEngineScript::name() const
return d->coreScript.name();
}
+/*!
+ \qmlproperty url WebEngineScript::sourceUrl
+
+ This property holds the remote source location of the user script (if any).
+
+ Unlike \l sourceCode, this property allows referring to user scripts that
+ are not already loaded in memory, for instance, when stored on disk.
+
+ Setting this property will change the \l sourceCode of the script.
+
+ \note At present, only file-based sources are supported.
+
+ \sa sourceCode
+*/
QUrl QQuickWebEngineScript::sourceUrl() const
{
Q_D(const QQuickWebEngineScript);
return d->m_sourceUrl;
}
+/*!
+ \qmlproperty string WebEngineScript::sourceCode
+
+ This property holds the JavaScript source code of the user script.
+
+ \sa sourceUrl
+*/
QString QQuickWebEngineScript::sourceCode() const
{
Q_D(const QQuickWebEngineScript);