diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-11-02 18:37:42 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2022-11-30 13:20:41 +0100 |
commit | 898a34fa01eb9e01573843fa17ab5531e3c45478 (patch) | |
tree | 77023c13e772c98a0d5ba0c65f33a07942aa01f9 | |
parent | cb702f2ec4f9a53a018ca7a878766326f7dcb4f6 (diff) | |
download | qtwebengine-898a34fa01eb9e01573843fa17ab5531e3c45478.tar.gz |
Doc: Add Local Storage feature
Fixes: QTBUG-106502
Change-Id: I01dcec5e76db7921fc2597e6921e3bc6a6424aa8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 147bf5922e4e287aff1d196e48451bf8767205aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/doc/src/qtwebengine-features.qdoc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/doc/src/qtwebengine-features.qdoc b/src/core/doc/src/qtwebengine-features.qdoc index 16f87dfd3..442f19b8a 100644 --- a/src/core/doc/src/qtwebengine-features.qdoc +++ b/src/core/doc/src/qtwebengine-features.qdoc @@ -22,6 +22,7 @@ \li \l{HTML5 Geolocation} \li \l{HTML5 WebSockets} \li \l{HTTP/2 Protocol} + \li \l{Local Storage} \li \l{Native Dialogs} \li \l{Pepper Plugin API} \li \l{PDF File Viewing} @@ -302,6 +303,31 @@ \l{Akamai HTTP/2 Demo}, in \l{WebEngine Widgets Simple Browser Example} {Simple Browser} or \l{WebEngine Quick Nano Browser}{Nano Browser}. + \section1 Local Storage + + \QWE supports saving key-value pairs in a \c {Local Storage} with no expiration date. + This is a part of the \l + {https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API} + {Web Storage API}, where a user can access a \c Storage object for the given domains + using the \c Window.localStorage JavaScript property. The stored data will persist even + after the page or the browser application is closed. + + Note that the \c Local Storage can be also disabled with a + \l QWebEngineSettings::LocalStorageEnabled + setting. Moreover, the storage path can be adjusted with a + \l QWebEngineProfile::setPersistentStoragePath + call. + + \code + QWebEngineProfile profile("MyProfile"); + profile.settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, isEnabled); + profile.setPersistentStoragePath("/path/to/storage"); + \endcode + + \QWE offers also an easy way of investigating the content of the \c {Local Storage} + with \l {Qt WebEngine Developer Tools} by visiting the \uicontrol Application panel + and expanding the \uicontrol {Local Storage} menu. + \section1 Native Dialogs A web page might request dialogs for the following functions: |