diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-10-09 10:50:56 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-10-09 11:24:35 +0000 |
commit | 2e9c6cd0bd6789a4f46fe0bcfbd522f0dd3eb4cb (patch) | |
tree | 0314d272fae1d2edc86892f2ef185713a80bb9e7 /src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | |
parent | 84ae0d9c56e9638e5dcf676e1b3fd95571ad1973 (diff) |
add RequestClose web action
Web pages can set the onbeforeunload handler to let the user confirm
whether to leave the page or not. Until now, only when leaving the
page via a link, a confirmation was shown.
Before actually closing a web page, applications can now trigger
the RequestClose web action. This will give the use the chance to
confirm or deny the close request.
If the request is confirmed, the signal windowCloseRequested is
emitted.
Task-number: QTBUG-36155
Change-Id: Icc1fabc37a2ac537f674c2f00bc8966e4dc4e610
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc')
-rw-r--r-- | src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 4a7545c14..b7b3bf022 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -119,6 +119,9 @@ \value InspectElement Trigger any attached Web Inspector to inspect the highlighed element. (Added in Qt 5.6) \value ExitFullScreen Exit the fullscreen mode. (Added in Qt 5.6) + \value RequestClose Request to close the web page. If defined, the \c{window.onbeforeunload} + handler is run, and the user can confirm or reject to close the page. If the close + request is confirmed, \c windowCloseRequested is emitted. (Added in Qt 5.6) \omitvalue WebActionCount @@ -482,6 +485,8 @@ This signal is emitted whenever the page requests the web browser window to be closed, for example through the JavaScript \c{window.close()} call. + + \sa QWebEnginePage::RequestClose */ /*! |