/* Copyright (C) 2015 The Qt Company Ltd. Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies) Copyright (C) 2007 Staikos Computing Services Inc. Copyright (C) 2007 Apple Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // The documentation in this file was imported from QtWebKit and is thus constrained // by its LGPL license. Documentation written from scratch for new methods should be // placed inline in the code as usual. /*! \class QWebEnginePage \brief The QWebEnginePage class provides an object to view and edit web documents. \since 5.4 \inmodule QtWebEngineWidgets A \e {web engine page} holds the contents of an HTML document, the history of navigated links, and actions. QWebEnginePage's API is very similar to QWebEngineView, as you are still provided with common functions like action() (known as \l{QWebEngineView::pageAction()}{pageAction}() in QWebEngineView), triggerAction(), and findText(). A page can be loaded using load() or setUrl(). Alternatively, if you have the HTML content readily available, you can use setHtml(). The QWebEnginePage class also offers methods to retrieve both the URL currently loaded by the page (see url()) as well as the URL originally requested to be loaded (see requestedUrl()). These methods make possible the retrieval of the URL before and after a DNS resolution or a redirection occurs during the load process. The requestedUrl() also matches to the URL added to the page history (\l{QWebEngineHistory}) if load is successful. The title of an HTML page can be accessed with the title() property. Additionally, a page may also specify an icon, which can be accessed using the iconUrl() property. If the title or the icon changes, the corresponding titleChanged() and iconUrlChanged() signals will be emitted. The zoomFactor() property can be used to change the overall size of the content displayed in the page. The loadStarted() signal is emitted when the page begins to load, whereas the loadProgress() signal is emitted whenever an element of the web page completes loading, such as an embedded image or a script. The loadFinished() signal is emitted when the page contents have been loaded completely, independent of script execution or page rendering. Its argument, either \c true or \c false, indicates whether or not the load operation succeeded. An HTML document is loaded in a \e {main frame} within the web page. If it references \e {child frames} (as defined by the \c or \c