5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.WebBrowser.WebBrowserPage</h1> |
9 <h1>eric7.WebBrowser.WebBrowserPage</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the helpbrowser using QWebView. |
11 Module implementing the helpbrowser using QWebView. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>SSL_AVAILABLE</td></tr> |
16 <tr><td>SSL_AVAILABLE</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
|
21 <table> |
20 <table> |
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#WebBrowserPage">WebBrowserPage</a></td> |
22 <td><a href="#WebBrowserPage">WebBrowserPage</a></td> |
25 <td>Class implementing an enhanced web page.</td> |
23 <td>Class implementing an enhanced web page.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
|
30 <table> |
28 <table> |
31 <tr><td>None</td></tr> |
29 <tr><td>None</td></tr> |
32 </table> |
30 </table> |
|
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="WebBrowserPage" ID="WebBrowserPage"></a> |
34 <a NAME="WebBrowserPage" ID="WebBrowserPage"></a> |
36 <h2>WebBrowserPage</h2> |
35 <h2>WebBrowserPage</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing an enhanced web page. |
37 Class implementing an enhanced web page. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Signals</h3> |
40 <h3>Signals</h3> |
42 <dl> |
41 <dl> |
43 |
42 |
44 <dt>navigationRequestAccepted(url, navigation type, main frame)</dt> |
43 <dt>navigationRequestAccepted(url, navigation type, main frame)</dt> |
45 <dd> |
44 <dd> |
206 <tr> |
203 <tr> |
207 <td><a href="#WebBrowserPage.view">view</a></td> |
204 <td><a href="#WebBrowserPage.view">view</a></td> |
208 <td>Public method to get a reference to the WebBrowserView associated with the page.</td> |
205 <td>Public method to get a reference to the WebBrowserView associated with the page.</td> |
209 </tr> |
206 </tr> |
210 </table> |
207 </table> |
|
208 |
211 <h3>Static Methods</h3> |
209 <h3>Static Methods</h3> |
212 |
|
213 <table> |
210 <table> |
214 <tr><td>None</td></tr> |
211 <tr><td>None</td></tr> |
215 </table> |
212 </table> |
216 |
213 |
|
214 |
217 <a NAME="WebBrowserPage.setUserAgent" ID="WebBrowserPage.setUserAgent"></a> |
215 <a NAME="WebBrowserPage.setUserAgent" ID="WebBrowserPage.setUserAgent"></a> |
218 <h4>WebBrowserPage.setUserAgent (class method)</h4> |
216 <h4>WebBrowserPage.setUserAgent (class method)</h4> |
219 <b>setUserAgent</b>(<i>agent</i>) |
217 <b>setUserAgent</b>(<i>agent</i>) |
220 |
|
221 <p> |
218 <p> |
222 Class method to set the global user agent string. |
219 Class method to set the global user agent string. |
223 </p> |
220 </p> |
|
221 |
224 <dl> |
222 <dl> |
225 |
223 |
226 <dt><i>agent</i> (str)</dt> |
224 <dt><i>agent</i> (str)</dt> |
227 <dd> |
225 <dd> |
228 new current user agent string |
226 new current user agent string |
229 </dd> |
227 </dd> |
230 </dl> |
228 </dl> |
231 <a NAME="WebBrowserPage.userAgent" ID="WebBrowserPage.userAgent"></a> |
229 <a NAME="WebBrowserPage.userAgent" ID="WebBrowserPage.userAgent"></a> |
232 <h4>WebBrowserPage.userAgent (class method)</h4> |
230 <h4>WebBrowserPage.userAgent (class method)</h4> |
233 <b>userAgent</b>(<i>resolveEmpty=False</i>) |
231 <b>userAgent</b>(<i>resolveEmpty=False</i>) |
234 |
|
235 <p> |
232 <p> |
236 Class method to get the global user agent setting. |
233 Class method to get the global user agent setting. |
237 </p> |
234 </p> |
|
235 |
238 <dl> |
236 <dl> |
239 |
237 |
240 <dt><i>resolveEmpty</i> (bool)</dt> |
238 <dt><i>resolveEmpty</i> (bool)</dt> |
241 <dd> |
239 <dd> |
242 flag indicating to resolve an empty |
240 flag indicating to resolve an empty |
300 </dd> |
298 </dd> |
301 </dl> |
299 </dl> |
302 <a NAME="WebBrowserPage.__contentsSizeChanged" ID="WebBrowserPage.__contentsSizeChanged"></a> |
300 <a NAME="WebBrowserPage.__contentsSizeChanged" ID="WebBrowserPage.__contentsSizeChanged"></a> |
303 <h4>WebBrowserPage.__contentsSizeChanged</h4> |
301 <h4>WebBrowserPage.__contentsSizeChanged</h4> |
304 <b>__contentsSizeChanged</b>(<i>size</i>) |
302 <b>__contentsSizeChanged</b>(<i>size</i>) |
305 |
|
306 <p> |
303 <p> |
307 Private slot to work around QWebEnginePage not scrolling to anchors |
304 Private slot to work around QWebEnginePage not scrolling to anchors |
308 when opened in a background tab. |
305 when opened in a background tab. |
309 </p> |
306 </p> |
|
307 |
310 <dl> |
308 <dl> |
311 |
309 |
312 <dt><i>size</i> (QSizeF)</dt> |
310 <dt><i>size</i> (QSizeF)</dt> |
313 <dd> |
311 <dd> |
314 changed contents size (unused) |
312 changed contents size (unused) |
315 </dd> |
313 </dd> |
316 </dl> |
314 </dl> |
317 <a NAME="WebBrowserPage.__featurePermissionRequested" ID="WebBrowserPage.__featurePermissionRequested"></a> |
315 <a NAME="WebBrowserPage.__featurePermissionRequested" ID="WebBrowserPage.__featurePermissionRequested"></a> |
318 <h4>WebBrowserPage.__featurePermissionRequested</h4> |
316 <h4>WebBrowserPage.__featurePermissionRequested</h4> |
319 <b>__featurePermissionRequested</b>(<i>url, feature</i>) |
317 <b>__featurePermissionRequested</b>(<i>url, feature</i>) |
320 |
|
321 <p> |
318 <p> |
322 Private slot handling a feature permission request. |
319 Private slot handling a feature permission request. |
323 </p> |
320 </p> |
|
321 |
324 <dl> |
322 <dl> |
325 |
323 |
326 <dt><i>url</i> (QUrl)</dt> |
324 <dt><i>url</i> (QUrl)</dt> |
327 <dd> |
325 <dd> |
328 url requesting the feature |
326 url requesting the feature |
333 </dd> |
331 </dd> |
334 </dl> |
332 </dl> |
335 <a NAME="WebBrowserPage.__fullScreenRequested" ID="WebBrowserPage.__fullScreenRequested"></a> |
333 <a NAME="WebBrowserPage.__fullScreenRequested" ID="WebBrowserPage.__fullScreenRequested"></a> |
336 <h4>WebBrowserPage.__fullScreenRequested</h4> |
334 <h4>WebBrowserPage.__fullScreenRequested</h4> |
337 <b>__fullScreenRequested</b>(<i>request</i>) |
335 <b>__fullScreenRequested</b>(<i>request</i>) |
338 |
|
339 <p> |
336 <p> |
340 Private slot handling a full screen request. |
337 Private slot handling a full screen request. |
341 </p> |
338 </p> |
|
339 |
342 <dl> |
340 <dl> |
343 |
341 |
344 <dt><i>request</i> (QWebEngineFullScreenRequest)</dt> |
342 <dt><i>request</i> (QWebEngineFullScreenRequest)</dt> |
345 <dd> |
343 <dd> |
346 reference to the full screen request |
344 reference to the full screen request |
347 </dd> |
345 </dd> |
348 </dl> |
346 </dl> |
349 <a NAME="WebBrowserPage.__registerProtocolHandlerRequested" ID="WebBrowserPage.__registerProtocolHandlerRequested"></a> |
347 <a NAME="WebBrowserPage.__registerProtocolHandlerRequested" ID="WebBrowserPage.__registerProtocolHandlerRequested"></a> |
350 <h4>WebBrowserPage.__registerProtocolHandlerRequested</h4> |
348 <h4>WebBrowserPage.__registerProtocolHandlerRequested</h4> |
351 <b>__registerProtocolHandlerRequested</b>(<i>request</i>) |
349 <b>__registerProtocolHandlerRequested</b>(<i>request</i>) |
352 |
|
353 <p> |
350 <p> |
354 Private slot to handle the registration of a custom protocol |
351 Private slot to handle the registration of a custom protocol |
355 handler. |
352 handler. |
356 </p> |
353 </p> |
|
354 |
357 <dl> |
355 <dl> |
358 |
356 |
359 <dt><i>request</i> (QWebEngineRegisterProtocolHandlerRequest)</dt> |
357 <dt><i>request</i> (QWebEngineRegisterProtocolHandlerRequest)</dt> |
360 <dd> |
358 <dd> |
361 reference to the registration request |
359 reference to the registration request |
362 </dd> |
360 </dd> |
363 </dl> |
361 </dl> |
364 <a NAME="WebBrowserPage.__setupChannelTimeout" ID="WebBrowserPage.__setupChannelTimeout"></a> |
362 <a NAME="WebBrowserPage.__setupChannelTimeout" ID="WebBrowserPage.__setupChannelTimeout"></a> |
365 <h4>WebBrowserPage.__setupChannelTimeout</h4> |
363 <h4>WebBrowserPage.__setupChannelTimeout</h4> |
366 <b>__setupChannelTimeout</b>(<i></i>) |
364 <b>__setupChannelTimeout</b>(<i></i>) |
367 |
|
368 <p> |
365 <p> |
369 Private slot to initiate the setup of the web channel. |
366 Private slot to initiate the setup of the web channel. |
370 </p> |
367 </p> |
|
368 |
371 <a NAME="WebBrowserPage.__setupWebChannelForUrl" ID="WebBrowserPage.__setupWebChannelForUrl"></a> |
369 <a NAME="WebBrowserPage.__setupWebChannelForUrl" ID="WebBrowserPage.__setupWebChannelForUrl"></a> |
372 <h4>WebBrowserPage.__setupWebChannelForUrl</h4> |
370 <h4>WebBrowserPage.__setupWebChannelForUrl</h4> |
373 <b>__setupWebChannelForUrl</b>(<i>url</i>) |
371 <b>__setupWebChannelForUrl</b>(<i>url</i>) |
374 |
|
375 <p> |
372 <p> |
376 Private method to setup a web channel to our external object. |
373 Private method to setup a web channel to our external object. |
377 </p> |
374 </p> |
|
375 |
378 <dl> |
376 <dl> |
379 |
377 |
380 <dt><i>url</i> (QUrl)</dt> |
378 <dt><i>url</i> (QUrl)</dt> |
381 <dd> |
379 <dd> |
382 URL for which to setup the web channel |
380 URL for which to setup the web channel |
383 </dd> |
381 </dd> |
384 </dl> |
382 </dl> |
385 <a NAME="WebBrowserPage.__urlChanged" ID="WebBrowserPage.__urlChanged"></a> |
383 <a NAME="WebBrowserPage.__urlChanged" ID="WebBrowserPage.__urlChanged"></a> |
386 <h4>WebBrowserPage.__urlChanged</h4> |
384 <h4>WebBrowserPage.__urlChanged</h4> |
387 <b>__urlChanged</b>(<i>url</i>) |
385 <b>__urlChanged</b>(<i>url</i>) |
388 |
|
389 <p> |
386 <p> |
390 Private slot to handle changes of the URL. |
387 Private slot to handle changes of the URL. |
391 </p> |
388 </p> |
|
389 |
392 <dl> |
390 <dl> |
393 |
391 |
394 <dt><i>url</i> (QUrl)</dt> |
392 <dt><i>url</i> (QUrl)</dt> |
395 <dd> |
393 <dd> |
396 new URL |
394 new URL |
397 </dd> |
395 </dd> |
398 </dl> |
396 </dl> |
399 <a NAME="WebBrowserPage.acceptNavigationRequest" ID="WebBrowserPage.acceptNavigationRequest"></a> |
397 <a NAME="WebBrowserPage.acceptNavigationRequest" ID="WebBrowserPage.acceptNavigationRequest"></a> |
400 <h4>WebBrowserPage.acceptNavigationRequest</h4> |
398 <h4>WebBrowserPage.acceptNavigationRequest</h4> |
401 <b>acceptNavigationRequest</b>(<i>url, type_, isMainFrame</i>) |
399 <b>acceptNavigationRequest</b>(<i>url, type_, isMainFrame</i>) |
402 |
|
403 <p> |
400 <p> |
404 Public method to determine, if a request may be accepted. |
401 Public method to determine, if a request may be accepted. |
405 </p> |
402 </p> |
|
403 |
406 <dl> |
404 <dl> |
407 |
405 |
408 <dt><i>url</i> (QUrl)</dt> |
406 <dt><i>url</i> (QUrl)</dt> |
409 <dd> |
407 <dd> |
410 URL to navigate to |
408 URL to navigate to |
458 </dd> |
456 </dd> |
459 </dl> |
457 </dl> |
460 <a NAME="WebBrowserPage.clearSslConfiguration" ID="WebBrowserPage.clearSslConfiguration"></a> |
458 <a NAME="WebBrowserPage.clearSslConfiguration" ID="WebBrowserPage.clearSslConfiguration"></a> |
461 <h4>WebBrowserPage.clearSslConfiguration</h4> |
459 <h4>WebBrowserPage.clearSslConfiguration</h4> |
462 <b>clearSslConfiguration</b>(<i></i>) |
460 <b>clearSslConfiguration</b>(<i></i>) |
463 |
|
464 <p> |
461 <p> |
465 Public slot to clear the stored SSL configuration data. |
462 Public slot to clear the stored SSL configuration data. |
466 </p> |
463 </p> |
|
464 |
467 <a NAME="WebBrowserPage.execJavaScript" ID="WebBrowserPage.execJavaScript"></a> |
465 <a NAME="WebBrowserPage.execJavaScript" ID="WebBrowserPage.execJavaScript"></a> |
468 <h4>WebBrowserPage.execJavaScript</h4> |
466 <h4>WebBrowserPage.execJavaScript</h4> |
469 <b>execJavaScript</b>(<i>script, worldId=QWebEngineScript.ScriptWorldId.MainWorld, timeout=500</i>) |
467 <b>execJavaScript</b>(<i>script, worldId=QWebEngineScript.ScriptWorldId.MainWorld, timeout=500</i>) |
470 |
|
471 <p> |
468 <p> |
472 Public method to execute a JavaScript function synchroneously. |
469 Public method to execute a JavaScript function synchroneously. |
473 </p> |
470 </p> |
|
471 |
474 <dl> |
472 <dl> |
475 |
473 |
476 <dt><i>script</i> (str)</dt> |
474 <dt><i>script</i> (str)</dt> |
477 <dd> |
475 <dd> |
478 JavaScript script source to be executed |
476 JavaScript script source to be executed |
695 <b>resultCallback</b>(<i>resDict=resultDict</i>) |
693 <b>resultCallback</b>(<i>resDict=resultDict</i>) |
696 |
694 |
697 <a NAME="WebBrowserPage.runJavaScript" ID="WebBrowserPage.runJavaScript"></a> |
695 <a NAME="WebBrowserPage.runJavaScript" ID="WebBrowserPage.runJavaScript"></a> |
698 <h4>WebBrowserPage.runJavaScript</h4> |
696 <h4>WebBrowserPage.runJavaScript</h4> |
699 <b>runJavaScript</b>(<i>script, worldId=-1, callback=None</i>) |
697 <b>runJavaScript</b>(<i>script, worldId=-1, callback=None</i>) |
700 |
|
701 <p> |
698 <p> |
702 Public method to run a script in the context of the page. |
699 Public method to run a script in the context of the page. |
703 </p> |
700 </p> |
|
701 |
704 <dl> |
702 <dl> |
705 |
703 |
706 <dt><i>script</i> (str)</dt> |
704 <dt><i>script</i> (str)</dt> |
707 <dd> |
705 <dd> |
708 JavaScript script source to be executed |
706 JavaScript script source to be executed |
736 </dd> |
734 </dd> |
737 </dl> |
735 </dl> |
738 <a NAME="WebBrowserPage.scrollTo" ID="WebBrowserPage.scrollTo"></a> |
736 <a NAME="WebBrowserPage.scrollTo" ID="WebBrowserPage.scrollTo"></a> |
739 <h4>WebBrowserPage.scrollTo</h4> |
737 <h4>WebBrowserPage.scrollTo</h4> |
740 <b>scrollTo</b>(<i>pos</i>) |
738 <b>scrollTo</b>(<i>pos</i>) |
741 |
|
742 <p> |
739 <p> |
743 Public method to scroll to the given position. |
740 Public method to scroll to the given position. |
744 </p> |
741 </p> |
|
742 |
745 <dl> |
743 <dl> |
746 |
744 |
747 <dt><i>pos</i> (QPointF)</dt> |
745 <dt><i>pos</i> (QPointF)</dt> |
748 <dd> |
746 <dd> |
749 position to scroll to |
747 position to scroll to |
750 </dd> |
748 </dd> |
751 </dl> |
749 </dl> |
752 <a NAME="WebBrowserPage.setSslConfiguration" ID="WebBrowserPage.setSslConfiguration"></a> |
750 <a NAME="WebBrowserPage.setSslConfiguration" ID="WebBrowserPage.setSslConfiguration"></a> |
753 <h4>WebBrowserPage.setSslConfiguration</h4> |
751 <h4>WebBrowserPage.setSslConfiguration</h4> |
754 <b>setSslConfiguration</b>(<i>sslConfiguration</i>) |
752 <b>setSslConfiguration</b>(<i>sslConfiguration</i>) |
755 |
|
756 <p> |
753 <p> |
757 Public slot to set the SSL configuration data of the page. |
754 Public slot to set the SSL configuration data of the page. |
758 </p> |
755 </p> |
|
756 |
759 <dl> |
757 <dl> |
760 |
758 |
761 <dt><i>sslConfiguration</i> (QSslConfiguration)</dt> |
759 <dt><i>sslConfiguration</i> (QSslConfiguration)</dt> |
762 <dd> |
760 <dd> |
763 SSL configuration to be set |
761 SSL configuration to be set |
764 </dd> |
762 </dd> |
765 </dl> |
763 </dl> |
766 <a NAME="WebBrowserPage.showSslInfo" ID="WebBrowserPage.showSslInfo"></a> |
764 <a NAME="WebBrowserPage.showSslInfo" ID="WebBrowserPage.showSslInfo"></a> |
767 <h4>WebBrowserPage.showSslInfo</h4> |
765 <h4>WebBrowserPage.showSslInfo</h4> |
768 <b>showSslInfo</b>(<i>pos</i>) |
766 <b>showSslInfo</b>(<i>pos</i>) |
769 |
|
770 <p> |
767 <p> |
771 Public slot to show some SSL information for the loaded page. |
768 Public slot to show some SSL information for the loaded page. |
772 </p> |
769 </p> |
|
770 |
773 <dl> |
771 <dl> |
774 |
772 |
775 <dt><i>pos</i> (QPoint)</dt> |
773 <dt><i>pos</i> (QPoint)</dt> |
776 <dd> |
774 <dd> |
777 position to show the info at |
775 position to show the info at |
778 </dd> |
776 </dd> |
779 </dl> |
777 </dl> |
780 <a NAME="WebBrowserPage.view" ID="WebBrowserPage.view"></a> |
778 <a NAME="WebBrowserPage.view" ID="WebBrowserPage.view"></a> |
781 <h4>WebBrowserPage.view</h4> |
779 <h4>WebBrowserPage.view</h4> |
782 <b>view</b>(<i></i>) |
780 <b>view</b>(<i></i>) |
783 |
|
784 <p> |
781 <p> |
785 Public method to get a reference to the WebBrowserView associated with |
782 Public method to get a reference to the WebBrowserView associated with |
786 the page. |
783 the page. |
787 </p> |
784 </p> |
|
785 |
788 <dl> |
786 <dl> |
789 <dt>Return:</dt> |
787 <dt>Return:</dt> |
790 <dd> |
788 <dd> |
791 reference to the WebBrowserView associated with the page |
789 reference to the WebBrowserView associated with the page |
792 </dd> |
790 </dd> |