From af45af254b6cc80b15a5f768785ca2862fadbfe4 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 10 Mar 2015 13:52:41 +0100 Subject: QQuickWebEngineScript: First stab at documenting sourceUrl and sourceCode. Change-Id: I9674488a95e3d0293c52b854201bb840392a641f Reviewed-by: Pierre Rossi --- src/webengine/api/qquickwebenginescript.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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); -- cgit v1.2.3