diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2016-06-27 17:41:39 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2016-07-21 08:05:02 +0000 |
commit | 1043c0507981c35047832c3d8e942c3840484b9a (patch) | |
tree | 4a1375538599ccbcb4ec246cdfceed5bb628fe5f /src | |
parent | d29884456544a95e7b23600424d54bc85392ed6b (diff) |
Doc: Move details about script injection in overview to separate section
Change-Id: I51562b2dff1ffe4359c6db4a802c406c3706de84
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index 5cf3a0eb0..3780e6288 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -98,19 +98,6 @@ execute JavaScript. This mitigates security issues and isolates crashes caused by specific content. - The document object model (DOM) of a page is constructed when the document is ready, typically - when the page is completely loaded. Therefore, executing scripts as soon as a document is - created is not suitable for DOM operations, where one has to wait until the DOM is ready. - - In addition, an injected script shares the same \e world as the other scripts executed on the - page, which might lead to conflicts. To avoid this, the QWebEngineScript class and the - WebEngineScript QML type provide implementations of the Chromium API for - \e{Content Script Extensions}. They specify the - script to run, the injection point, and the world where the script is run. This enables - accessing the DOM to manipulate it within a world. - - \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported. - \section1 Embedding Web Content into Widget Based Applications Use the QWebEngineView class to display web pages in the simplest way. Because it is a widget, @@ -178,6 +165,24 @@ \skipto import \printuntil /^\}/ + \section1 Script Injection + + Qt WebEngine does not allow direct access to the document object model (DOM) of a page. + However, the DOM can be inspected and adapted by injecting scripts. + + The DOM of a page is constructed when the document is ready, typically + when the page is completely loaded. Therefore, executing scripts as soon as a document is + created is not suitable for DOM operations, where one has to wait until the DOM is ready. + + In addition, an injected script shares the same \e world as the other scripts executed on the + page, which might lead to conflicts. To avoid this, the QWebEngineScript class and the + WebEngineScript QML type provide implementations of the Chromium API for + \e{Content Script Extensions}. They specify the + script to run, the injection point, and the world where the script is run. This enables + accessing the DOM to manipulate it within a world. + + \note Chromium extensions, such as \c @include, \c @match, and \c @exclude, are not supported. + \section1 Managing Certificates Qt WebEngine uses its own network stack, and therefore QSslConfiguration is not used to |