Skip to content

Commit a3c7fab

Browse files
author
Allan Sandfeld Jensen
committed
Document world ID limit
The max was bumbed from 11 to 256, now document it. Task-number: QTBUG-69904 Change-Id: I6cbf64afe3409c4722d7a903d833124880b32bc0 Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Kai Koehne <[email protected]>
1 parent e7d460a commit a3c7fab

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/webengine/api/qquickwebenginescript.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ QT_BEGIN_NAMESPACE
8686
/*!
8787
\enum QQuickWebEngineScript::ScriptWorldId
8888
89-
The world ID defining which isolated world the script is executed in.
89+
The world ID defining which isolated world the script is executed in. Besides these predefined
90+
IDs custom IDs can be used, but must be integers between \c 0 and \c 256.
9091
9192
\value MainWorld
9293
The world used by the page's web contents. It can be useful in order to expose custom

src/webengine/doc/src/webengineview_lgpl.qdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
\since QtWebEngine 1.3
366366

367367
JavaScript world that the web channel instance used by this view is
368-
installed in.
368+
installed in. The world must be a number between \c 0 and \c 256.
369369
*/
370370

371371
/*!

src/webenginewidgets/api/qwebenginescript.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ quint32 QWebEngineScript::worldId() const
224224

225225
/*!
226226
Sets the world ID of the isolated world to \a id when running this script.
227+
228+
Must be between \c 0 and \c 256.
227229
*/
228230
void QWebEngineScript::setWorldId(quint32 id)
229231
{

src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,9 @@
718718
\since 5.7
719719

720720
Runs the JavaScript code contained in \a scriptSource in the world specified by \a worldId.
721-
The world ID values are the same as provided by QWebEngineScript::ScriptWorldId. Using the
722-
\e runJavaScript() versions without the world ID is the same as running the script in the
723-
\c MainWorld.
721+
The world ID values are the same as provided by QWebEngineScript::ScriptWorldId, and between \c 0
722+
and \c 256. Using the \e runJavaScript() versions without the world ID is the same as running the
723+
script in the \c MainWorld.
724724

725725
When the script has been executed, \a resultCallback is called with the result of the last
726726
executed statement. \c resultCallback can be any of a function pointer, a functor or a lambda,

0 commit comments

Comments
 (0)