From 898a34fa01eb9e01573843fa17ab5531e3c45478 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 2 Nov 2022 18:37:42 +0100 Subject: Doc: Add Local Storage feature Fixes: QTBUG-106502 Change-Id: I01dcec5e76db7921fc2597e6921e3bc6a6424aa8 Reviewed-by: Leena Miettinen (cherry picked from commit 147bf5922e4e287aff1d196e48451bf8767205aa) Reviewed-by: Qt Cherry-pick Bot --- src/core/doc/src/qtwebengine-features.qdoc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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: -- cgit v1.2.1