summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-03-21 18:09:08 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-03-21 18:09:08 +0100
commitb1153753221513aa5687001c84a1c9ed69925dc6 (patch)
tree3569ad54e433fee8244effe558ca52e567b6890d /src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
parent4d6b2dc88bda15ade9d04e54d80b7e4693d59832 (diff)
parentc2687689ba42d6021ae3f220d9fd240609489d3a (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/3rdparty src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc Change-Id: I90728e965399e51b626d538924de955f9abab5fe
Diffstat (limited to 'src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc')
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc50
1 files changed, 33 insertions, 17 deletions
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index 2d928b0f5..d6b89cb57 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -30,8 +30,8 @@
\since 5.4
\inmodule QtWebEngineWidgets
- A web engine page holds a main frame responsible for web content, the history
- of navigated links, and actions.
+ 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
@@ -42,7 +42,7 @@
the HTML content readily available, you can use setHtml().
The QWebEnginePage class also offers methods to retrieve both the URL currently
- loaded by its main frame (see url()) as well as the URL originally requested
+ 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
@@ -62,6 +62,22 @@
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 <frame> or \c <iframe> elements), they are considered
+ part of the content. Child frames are individually accessible only through JavaScript.
+
+ Web sites define \e {security origin} for safely accessing each other's resources for
+ client-side scripting or databases. An origin consist of a host name, a scheme, and a port
+ number. For example, the sites \c http://www.example.com/my/page.html and
+ \c http://www.example.com/my/overview.html are allowed to share the same database or access
+ each other's documents when used in HTML frame sets and JavaScript. At the same time,
+ \c http://www.malicious.com/evil.html is prevented from accessing the resources of
+ \c http://www.example.com/, because they are of a different security origin.
+ By default, local schemes like \c file:// and \c qrc:// are considered to be in the same
+ security origin, and can access each other's resources. Local resources are by default
+ restricted from accessing remote content, which means that \c file:// will not be able to
+ access \c http://domain.com/foo.html.
+
Scripts can be executed on the web page by using runJavaScript(), either in the main
JavaScript \e world, along with the rest of the JavaScript coming from the web contents, or in
their own isolated world. While the DOM of the page can be accessed from any world, JavaScript
@@ -292,7 +308,7 @@
\since 5.5
This function is called upon receiving a request to navigate to the specified \a url by means of
the specified navigation type \a type. \a isMainFrame indicates whether the request corresponds
- to the main frame or a sub frame. If the function returns \c true, the navigation request is
+ to the main frame or a child frame. If the function returns \c true, the navigation request is
accepted and \c url is loaded. The default implementation accepts all navigation requests.
This function is called for absolute URLs that are prefixed with \c {http://} or \c {https://}
@@ -543,14 +559,14 @@
/*!
\property QWebEnginePage::title
- \brief the title of the frame as defined by the HTML &lt;title&gt; element
+ \brief the title of the page as defined by the HTML \c <title> element
\sa titleChanged()
*/
/*!
\property QWebEnginePage::url
- \brief the URL of the frame currently viewed
+ \brief the URL of the page currently viewed
Setting this property clears the view and loads the URL.
@@ -561,14 +577,14 @@
/*!
\property QWebEnginePage::iconUrl
- \brief the URL of the icon associated with the frame currently viewed.
+ \brief the URL of the icon associated with the page currently viewed.
\sa iconUrlChanged()
*/
/*!
\property QWebEnginePage::requestedUrl
- \brief the URL that was originally requested to be loaded by the frame
+ \brief the URL that was originally requested to be loaded by the page
that is currently viewed
\note The URL may differ from the one returned by url(), which is the actual
@@ -579,7 +595,7 @@
/*!
\fn void QWebEnginePage::load(const QUrl &url)
- Loads \a url into this frame.
+ Loads \a url into this page.
\note The view remains the same until enough data has arrived to display the new URL.
@@ -588,7 +604,7 @@
/*!
\fn void QWebEnginePage::setHtml(const QString &html, const QUrl &baseUrl)
- Sets the content of this page's main frame to \a html. \a baseUrl is optional and used to resolve relative
+ Sets the content of this page to \a html. \a baseUrl is optional and used to resolve relative
URLs in the document, such as referenced images or stylesheets.
The \a html is loaded immediately; external objects are loaded asynchronously.
@@ -604,7 +620,7 @@
This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
- \note This method will not affect session or global history for the frame.
+ \note This method will not affect session or global history for the page.
\warning This function works only for HTML, for other mime types (such as XHTML and SVG)
setContent() should be used instead.
@@ -614,7 +630,7 @@
/*!
\fn void QWebEnginePage::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
- Sets the content of this page's main frame to the specified content \a data. If the \a mimeType argument
+ Sets the content of this page to \a data. If the \a mimeType argument
is empty, it is currently assumed that the content is HTML but in future versions we may introduce
auto-detection.
@@ -622,14 +638,14 @@
The \a data is loaded immediately; external objects are loaded asynchronously.
- \note This method will not affect session or global history for the frame.
+ \note This method will not affect session or global history for the page.
\sa toHtml(), setHtml()
*/
/*!
\property QWebEnginePage::zoomFactor
- \brief the zoom factor for the main frame
+ \brief the zoom factor for the page content
*/
/*!
@@ -724,7 +740,7 @@
/*!
\fn void QWebEnginePage::titleChanged(const QString &title)
- This signal is emitted whenever the title of the main frame changes.
+ This signal is emitted whenever the title of the page changes.
The \a title string specifies the new title.
\sa title()
@@ -733,7 +749,7 @@
/*!
\fn void QWebEnginePage::urlChanged(const QUrl &url)
- This signal is emitted with the URL of the main frame when the main frame's title is
+ This signal is emitted with the URL of the page when the page title is
received. The new URL is specified by \a url.
\sa url()
@@ -742,7 +758,7 @@
/*!
\fn void QWebEnginePage::iconUrlChanged(const QUrl &url)
- This signal is emitted when the icon ("favicon") associated with the main frame is
+ This signal is emitted when the icon ("favicon") associated with the page is
found or changed. The new URL is specified by \a url.