WebBrowserView: Call acceptNavigationRequest() first in the load method.

Mon, 12 Feb 2018 19:19:50 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 12 Feb 2018 19:19:50 +0100
changeset 6141
f4cecd941096
parent 6140
c20e2d414d0d
child 6142
304a469455c8

WebBrowserView: Call acceptNavigationRequest() first in the load method.

WebBrowser/WebBrowserView.py file | annotate | diff | comparison | revisions
diff -r c20e2d414d0d -r f4cecd941096 WebBrowser/WebBrowserView.py
--- a/WebBrowser/WebBrowserView.py	Mon Feb 12 19:04:07 2018 +0100
+++ b/WebBrowser/WebBrowserView.py	Mon Feb 12 19:19:50 2018 +0100
@@ -188,6 +188,11 @@
         @param url URL to be loaded
         @type QUrl
         """
+        if self.__page is not None and \
+            not self.__page.acceptNavigationRequest(
+                url, QWebEnginePage.NavigationTypeTyped, True):
+            return
+        
         super(WebBrowserView, self).load(url)
         
         if not self.__firstLoad:

eric ide

mercurial