eric7/Documentation/Source/eric7.WebBrowser.WebBrowserPage.html

branch
eric7
changeset 8372
e0227a7c850e
child 8575
423c4db4101e
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.WebBrowserPage</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.WebBrowser.WebBrowserPage</h1>
24
25 <p>
26 Module implementing the helpbrowser using QWebView.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#WebBrowserPage">WebBrowserPage</a></td>
39 <td>Class implementing an enhanced web page.</td>
40 </tr>
41 </table>
42 <h3>Functions</h3>
43
44 <table>
45 <tr><td>None</td></tr>
46 </table>
47 <hr />
48 <hr />
49 <a NAME="WebBrowserPage" ID="WebBrowserPage"></a>
50 <h2>WebBrowserPage</h2>
51
52 <p>
53 Class implementing an enhanced web page.
54 </p>
55 <h3>Signals</h3>
56 <dl>
57
58 <dt>navigationRequestAccepted(url, navigation type, main frame)</dt>
59 <dd>
60 emitted
61 to signal an accepted navigation request
62 </dd>
63 <dt>printPageRequested()</dt>
64 <dd>
65 emitted to indicate a print request of the
66 shown web page
67 </dd>
68 <dt>safeBrowsingAbort()</dt>
69 <dd>
70 emitted to indicate an abort due to a safe
71 browsing event
72 </dd>
73 <dt>safeBrowsingBad(threatType, threatMessages)</dt>
74 <dd>
75 emitted to indicate a
76 malicious web site as determined by safe browsing
77 </dd>
78 <dt>sslConfigurationChanged()</dt>
79 <dd>
80 emitted to indicate a change of the
81 stored SSL configuration data
82 </dd>
83 </dl>
84 <h3>Derived from</h3>
85 QWebEnginePage
86 <h3>Class Attributes</h3>
87
88 <table>
89 <tr><td>SafeJsWorld</td></tr><tr><td>UnsafeJsWorld</td></tr>
90 </table>
91 <h3>Class Methods</h3>
92
93 <table>
94
95 <tr>
96 <td><a href="#WebBrowserPage.setUserAgent">setUserAgent</a></td>
97 <td>Class method to set the global user agent string.</td>
98 </tr>
99 <tr>
100 <td><a href="#WebBrowserPage.userAgent">userAgent</a></td>
101 <td>Class method to get the global user agent setting.</td>
102 </tr>
103 <tr>
104 <td><a href="#WebBrowserPage.userAgentForUrl">userAgentForUrl</a></td>
105 <td>Class method to determine the user agent for the given URL.</td>
106 </tr>
107 </table>
108 <h3>Methods</h3>
109
110 <table>
111
112 <tr>
113 <td><a href="#WebBrowserPage.__init__">WebBrowserPage</a></td>
114 <td>Constructor</td>
115 </tr>
116 <tr>
117 <td><a href="#WebBrowserPage.__contentsSizeChanged">__contentsSizeChanged</a></td>
118 <td>Private slot to work around QWebEnginePage not scrolling to anchors when opened in a background tab.</td>
119 </tr>
120 <tr>
121 <td><a href="#WebBrowserPage.__featurePermissionRequested">__featurePermissionRequested</a></td>
122 <td>Private slot handling a feature permission request.</td>
123 </tr>
124 <tr>
125 <td><a href="#WebBrowserPage.__fullScreenRequested">__fullScreenRequested</a></td>
126 <td>Private slot handling a full screen request.</td>
127 </tr>
128 <tr>
129 <td><a href="#WebBrowserPage.__registerProtocolHandlerRequested">__registerProtocolHandlerRequested</a></td>
130 <td>Private slot to handle the registration of a custom protocol handler.</td>
131 </tr>
132 <tr>
133 <td><a href="#WebBrowserPage.__setupChannelTimeout">__setupChannelTimeout</a></td>
134 <td>Private slot to initiate the setup of the web channel.</td>
135 </tr>
136 <tr>
137 <td><a href="#WebBrowserPage.__setupWebChannelForUrl">__setupWebChannelForUrl</a></td>
138 <td>Private method to setup a web channel to our external object.</td>
139 </tr>
140 <tr>
141 <td><a href="#WebBrowserPage.__urlChanged">__urlChanged</a></td>
142 <td>Private slot to handle changes of the URL.</td>
143 </tr>
144 <tr>
145 <td><a href="#WebBrowserPage.acceptNavigationRequest">acceptNavigationRequest</a></td>
146 <td>Public method to determine, if a request may be accepted.</td>
147 </tr>
148 <tr>
149 <td><a href="#WebBrowserPage.certificateError">certificateError</a></td>
150 <td>Public method to handle SSL certificate errors.</td>
151 </tr>
152 <tr>
153 <td><a href="#WebBrowserPage.clearSslConfiguration">clearSslConfiguration</a></td>
154 <td>Public slot to clear the stored SSL configuration data.</td>
155 </tr>
156 <tr>
157 <td><a href="#WebBrowserPage.execJavaScript">execJavaScript</a></td>
158 <td>Public method to execute a JavaScript function synchroneously.</td>
159 </tr>
160 <tr>
161 <td><a href="#WebBrowserPage.execPrintPage">execPrintPage</a></td>
162 <td>Public method to execute a synchronous print.</td>
163 </tr>
164 <tr>
165 <td><a href="#WebBrowserPage.getSafeBrowsingStatus">getSafeBrowsingStatus</a></td>
166 <td>Public method to get the safe browsing status of the current page.</td>
167 </tr>
168 <tr>
169 <td><a href="#WebBrowserPage.getSslCertificate">getSslCertificate</a></td>
170 <td>Public method to get a reference to the SSL certificate.</td>
171 </tr>
172 <tr>
173 <td><a href="#WebBrowserPage.getSslCertificateChain">getSslCertificateChain</a></td>
174 <td>Public method to get a reference to the SSL certificate chain.</td>
175 </tr>
176 <tr>
177 <td><a href="#WebBrowserPage.getSslConfiguration">getSslConfiguration</a></td>
178 <td>Public method to return a reference to the current SSL configuration.</td>
179 </tr>
180 <tr>
181 <td><a href="#WebBrowserPage.hasValidSslInfo">hasValidSslInfo</a></td>
182 <td>Public method to check, if the page has a valid SSL certificate.</td>
183 </tr>
184 <tr>
185 <td><a href="#WebBrowserPage.hitTestContent">hitTestContent</a></td>
186 <td>Public method to test the content at a specified position.</td>
187 </tr>
188 <tr>
189 <td><a href="#WebBrowserPage.icon">icon</a></td>
190 <td>Public method to get the web site icon.</td>
191 </tr>
192 <tr>
193 <td><a href="#WebBrowserPage.isJavaScriptEnabled">isJavaScriptEnabled</a></td>
194 <td>Public method to test, if JavaScript is enabled.</td>
195 </tr>
196 <tr>
197 <td><a href="#WebBrowserPage.javaScriptConsoleMessage">javaScriptConsoleMessage</a></td>
198 <td>Public method to show a console message.</td>
199 </tr>
200 <tr>
201 <td><a href="#WebBrowserPage.mapToViewport">mapToViewport</a></td>
202 <td>Public method to map a position to the viewport.</td>
203 </tr>
204 <tr>
205 <td><a href="#WebBrowserPage.printCallback">printCallback</a></td>
206 <td></td>
207 </tr>
208 <tr>
209 <td><a href="#WebBrowserPage.registerProtocolHandlerRequestScheme">registerProtocolHandlerRequestScheme</a></td>
210 <td>Public method to get the registered protocol handler request scheme.</td>
211 </tr>
212 <tr>
213 <td><a href="#WebBrowserPage.registerProtocolHandlerRequestUrl">registerProtocolHandlerRequestUrl</a></td>
214 <td>Public method to get the registered protocol handler request URL.</td>
215 </tr>
216 <tr>
217 <td><a href="#WebBrowserPage.resultCallback">resultCallback</a></td>
218 <td></td>
219 </tr>
220 <tr>
221 <td><a href="#WebBrowserPage.runJavaScript">runJavaScript</a></td>
222 <td>Public method to run a script in the context of the page.</td>
223 </tr>
224 <tr>
225 <td><a href="#WebBrowserPage.scroll">scroll</a></td>
226 <td>Public method to scroll by the given amount of pixels.</td>
227 </tr>
228 <tr>
229 <td><a href="#WebBrowserPage.scrollPosition">scrollPosition</a></td>
230 <td>Public method to get the scroll position of the web page.</td>
231 </tr>
232 <tr>
233 <td><a href="#WebBrowserPage.scrollTo">scrollTo</a></td>
234 <td>Public method to scroll to the given position.</td>
235 </tr>
236 <tr>
237 <td><a href="#WebBrowserPage.setSslConfiguration">setSslConfiguration</a></td>
238 <td>Public slot to set the SSL configuration data of the page.</td>
239 </tr>
240 <tr>
241 <td><a href="#WebBrowserPage.showSslInfo">showSslInfo</a></td>
242 <td>Public slot to show some SSL information for the loaded page.</td>
243 </tr>
244 </table>
245 <h3>Static Methods</h3>
246
247 <table>
248 <tr><td>None</td></tr>
249 </table>
250
251 <a NAME="WebBrowserPage.setUserAgent" ID="WebBrowserPage.setUserAgent"></a>
252 <h4>WebBrowserPage.setUserAgent (class method)</h4>
253 <b>setUserAgent</b>(<i>agent</i>)
254
255 <p>
256 Class method to set the global user agent string.
257 </p>
258 <dl>
259
260 <dt><i>agent</i></dt>
261 <dd>
262 new current user agent string (string)
263 </dd>
264 </dl>
265 <a NAME="WebBrowserPage.userAgent" ID="WebBrowserPage.userAgent"></a>
266 <h4>WebBrowserPage.userAgent (class method)</h4>
267 <b>userAgent</b>(<i>resolveEmpty=False</i>)
268
269 <p>
270 Class method to get the global user agent setting.
271 </p>
272 <dl>
273
274 <dt><i>resolveEmpty</i></dt>
275 <dd>
276 flag indicating to resolve an empty
277 user agent (boolean)
278 </dd>
279 </dl>
280 <dl>
281 <dt>Return:</dt>
282 <dd>
283 user agent string (string)
284 </dd>
285 </dl>
286 <a NAME="WebBrowserPage.userAgentForUrl" ID="WebBrowserPage.userAgentForUrl"></a>
287 <h4>WebBrowserPage.userAgentForUrl (class method)</h4>
288 <b>userAgentForUrl</b>(<i>url</i>)
289
290 <p>
291 Class method to determine the user agent for the given URL.
292 </p>
293 <dl>
294
295 <dt><i>url</i></dt>
296 <dd>
297 URL to determine user agent for (QUrl)
298 </dd>
299 </dl>
300 <dl>
301 <dt>Return:</dt>
302 <dd>
303 user agent string (string)
304 </dd>
305 </dl>
306 <a NAME="WebBrowserPage.__init__" ID="WebBrowserPage.__init__"></a>
307 <h4>WebBrowserPage (Constructor)</h4>
308 <b>WebBrowserPage</b>(<i>parent=None</i>)
309
310 <p>
311 Constructor
312 </p>
313 <dl>
314
315 <dt><i>parent</i></dt>
316 <dd>
317 parent widget of this window (QWidget)
318 </dd>
319 </dl>
320 <a NAME="WebBrowserPage.__contentsSizeChanged" ID="WebBrowserPage.__contentsSizeChanged"></a>
321 <h4>WebBrowserPage.__contentsSizeChanged</h4>
322 <b>__contentsSizeChanged</b>(<i>size</i>)
323
324 <p>
325 Private slot to work around QWebEnginePage not scrolling to anchors
326 when opened in a background tab.
327 </p>
328 <dl>
329
330 <dt><i>size</i> (QSize)</dt>
331 <dd>
332 changed contents size (unused)
333 </dd>
334 </dl>
335 <a NAME="WebBrowserPage.__featurePermissionRequested" ID="WebBrowserPage.__featurePermissionRequested"></a>
336 <h4>WebBrowserPage.__featurePermissionRequested</h4>
337 <b>__featurePermissionRequested</b>(<i>url, feature</i>)
338
339 <p>
340 Private slot handling a feature permission request.
341 </p>
342 <dl>
343
344 <dt><i>url</i> (QUrl)</dt>
345 <dd>
346 url requesting the feature
347 </dd>
348 <dt><i>feature</i> (QWebEnginePage.Feature)</dt>
349 <dd>
350 requested feature
351 </dd>
352 </dl>
353 <a NAME="WebBrowserPage.__fullScreenRequested" ID="WebBrowserPage.__fullScreenRequested"></a>
354 <h4>WebBrowserPage.__fullScreenRequested</h4>
355 <b>__fullScreenRequested</b>(<i>request</i>)
356
357 <p>
358 Private slot handling a full screen request.
359 </p>
360 <dl>
361
362 <dt><i>request</i> (QWebEngineFullScreenRequest)</dt>
363 <dd>
364 reference to the full screen request
365 </dd>
366 </dl>
367 <a NAME="WebBrowserPage.__registerProtocolHandlerRequested" ID="WebBrowserPage.__registerProtocolHandlerRequested"></a>
368 <h4>WebBrowserPage.__registerProtocolHandlerRequested</h4>
369 <b>__registerProtocolHandlerRequested</b>(<i>request</i>)
370
371 <p>
372 Private slot to handle the registration of a custom protocol
373 handler.
374 </p>
375 <dl>
376
377 <dt><i>request</i> (QWebEngineRegisterProtocolHandlerRequest)</dt>
378 <dd>
379 reference to the registration request
380 </dd>
381 </dl>
382 <a NAME="WebBrowserPage.__setupChannelTimeout" ID="WebBrowserPage.__setupChannelTimeout"></a>
383 <h4>WebBrowserPage.__setupChannelTimeout</h4>
384 <b>__setupChannelTimeout</b>(<i></i>)
385
386 <p>
387 Private slot to initiate the setup of the web channel.
388 </p>
389 <a NAME="WebBrowserPage.__setupWebChannelForUrl" ID="WebBrowserPage.__setupWebChannelForUrl"></a>
390 <h4>WebBrowserPage.__setupWebChannelForUrl</h4>
391 <b>__setupWebChannelForUrl</b>(<i>url</i>)
392
393 <p>
394 Private method to setup a web channel to our external object.
395 </p>
396 <dl>
397
398 <dt><i>url</i> (QUrl)</dt>
399 <dd>
400 URL for which to setup the web channel
401 </dd>
402 </dl>
403 <a NAME="WebBrowserPage.__urlChanged" ID="WebBrowserPage.__urlChanged"></a>
404 <h4>WebBrowserPage.__urlChanged</h4>
405 <b>__urlChanged</b>(<i>url</i>)
406
407 <p>
408 Private slot to handle changes of the URL.
409 </p>
410 <dl>
411
412 <dt><i>url</i> (QUrl)</dt>
413 <dd>
414 new URL
415 </dd>
416 </dl>
417 <a NAME="WebBrowserPage.acceptNavigationRequest" ID="WebBrowserPage.acceptNavigationRequest"></a>
418 <h4>WebBrowserPage.acceptNavigationRequest</h4>
419 <b>acceptNavigationRequest</b>(<i>url, type_, isMainFrame</i>)
420
421 <p>
422 Public method to determine, if a request may be accepted.
423 </p>
424 <dl>
425
426 <dt><i>url</i> (QUrl)</dt>
427 <dd>
428 URL to navigate to
429 </dd>
430 <dt><i>type_</i> (QWebEnginePage.NavigationType)</dt>
431 <dd>
432 type of the navigation request
433 </dd>
434 <dt><i>isMainFrame</i> (bool)</dt>
435 <dd>
436 flag indicating, that the request originated from
437 the main frame
438 </dd>
439 </dl>
440 <dl>
441 <dt>Return:</dt>
442 <dd>
443 flag indicating acceptance
444 </dd>
445 </dl>
446 <dl>
447 <dt>Return Type:</dt>
448 <dd>
449 bool
450 </dd>
451 </dl>
452 <a NAME="WebBrowserPage.certificateError" ID="WebBrowserPage.certificateError"></a>
453 <h4>WebBrowserPage.certificateError</h4>
454 <b>certificateError</b>(<i>error</i>)
455
456 <p>
457 Public method to handle SSL certificate errors.
458 </p>
459 <dl>
460
461 <dt><i>error</i> (QWebEngineCertificateError)</dt>
462 <dd>
463 object containing the certificate error information
464 </dd>
465 </dl>
466 <dl>
467 <dt>Return:</dt>
468 <dd>
469 flag indicating to ignore this error
470 </dd>
471 </dl>
472 <dl>
473 <dt>Return Type:</dt>
474 <dd>
475 bool
476 </dd>
477 </dl>
478 <a NAME="WebBrowserPage.clearSslConfiguration" ID="WebBrowserPage.clearSslConfiguration"></a>
479 <h4>WebBrowserPage.clearSslConfiguration</h4>
480 <b>clearSslConfiguration</b>(<i></i>)
481
482 <p>
483 Public slot to clear the stored SSL configuration data.
484 </p>
485 <a NAME="WebBrowserPage.execJavaScript" ID="WebBrowserPage.execJavaScript"></a>
486 <h4>WebBrowserPage.execJavaScript</h4>
487 <b>execJavaScript</b>(<i>script, worldId=QWebEngineScript.ScriptWorldId.MainWorld, timeout=500</i>)
488
489 <p>
490 Public method to execute a JavaScript function synchroneously.
491 </p>
492 <dl>
493
494 <dt><i>script</i> (str)</dt>
495 <dd>
496 JavaScript script source to be executed
497 </dd>
498 <dt><i>worldId</i> (QWebEngineScript.ScriptWorldId)</dt>
499 <dd>
500 ID to run the script under
501 </dd>
502 <dt><i>timeout</i> (int)</dt>
503 <dd>
504 max. time the script is given to execute
505 </dd>
506 </dl>
507 <dl>
508 <dt>Return:</dt>
509 <dd>
510 result of the script
511 </dd>
512 </dl>
513 <dl>
514 <dt>Return Type:</dt>
515 <dd>
516 depending upon script result
517 </dd>
518 </dl>
519 <a NAME="WebBrowserPage.execPrintPage" ID="WebBrowserPage.execPrintPage"></a>
520 <h4>WebBrowserPage.execPrintPage</h4>
521 <b>execPrintPage</b>(<i>printer, timeout=1000</i>)
522
523 <p>
524 Public method to execute a synchronous print.
525 </p>
526 <dl>
527
528 <dt><i>printer</i> (QPrinter)</dt>
529 <dd>
530 reference to the printer object
531 </dd>
532 <dt><i>timeout</i> (int)</dt>
533 <dd>
534 timeout value in milliseconds
535 </dd>
536 </dl>
537 <dl>
538 <dt>Return:</dt>
539 <dd>
540 flag indicating a successful print job
541 </dd>
542 </dl>
543 <dl>
544 <dt>Return Type:</dt>
545 <dd>
546 bool
547 </dd>
548 </dl>
549 <a NAME="WebBrowserPage.getSafeBrowsingStatus" ID="WebBrowserPage.getSafeBrowsingStatus"></a>
550 <h4>WebBrowserPage.getSafeBrowsingStatus</h4>
551 <b>getSafeBrowsingStatus</b>(<i></i>)
552
553 <p>
554 Public method to get the safe browsing status of the current page.
555 </p>
556 <dl>
557 <dt>Return:</dt>
558 <dd>
559 flag indicating a safe site
560 </dd>
561 </dl>
562 <dl>
563 <dt>Return Type:</dt>
564 <dd>
565 bool
566 </dd>
567 </dl>
568 <a NAME="WebBrowserPage.getSslCertificate" ID="WebBrowserPage.getSslCertificate"></a>
569 <h4>WebBrowserPage.getSslCertificate</h4>
570 <b>getSslCertificate</b>(<i></i>)
571
572 <p>
573 Public method to get a reference to the SSL certificate.
574 </p>
575 <dl>
576 <dt>Return:</dt>
577 <dd>
578 amended SSL certificate
579 </dd>
580 </dl>
581 <dl>
582 <dt>Return Type:</dt>
583 <dd>
584 QSslCertificate
585 </dd>
586 </dl>
587 <a NAME="WebBrowserPage.getSslCertificateChain" ID="WebBrowserPage.getSslCertificateChain"></a>
588 <h4>WebBrowserPage.getSslCertificateChain</h4>
589 <b>getSslCertificateChain</b>(<i></i>)
590
591 <p>
592 Public method to get a reference to the SSL certificate chain.
593 </p>
594 <dl>
595 <dt>Return:</dt>
596 <dd>
597 SSL certificate chain
598 </dd>
599 </dl>
600 <dl>
601 <dt>Return Type:</dt>
602 <dd>
603 list of QSslCertificate
604 </dd>
605 </dl>
606 <a NAME="WebBrowserPage.getSslConfiguration" ID="WebBrowserPage.getSslConfiguration"></a>
607 <h4>WebBrowserPage.getSslConfiguration</h4>
608 <b>getSslConfiguration</b>(<i></i>)
609
610 <p>
611 Public method to return a reference to the current SSL configuration.
612 </p>
613 <dl>
614 <dt>Return:</dt>
615 <dd>
616 reference to the SSL configuration in use
617 </dd>
618 </dl>
619 <dl>
620 <dt>Return Type:</dt>
621 <dd>
622 QSslConfiguration
623 </dd>
624 </dl>
625 <a NAME="WebBrowserPage.hasValidSslInfo" ID="WebBrowserPage.hasValidSslInfo"></a>
626 <h4>WebBrowserPage.hasValidSslInfo</h4>
627 <b>hasValidSslInfo</b>(<i></i>)
628
629 <p>
630 Public method to check, if the page has a valid SSL certificate.
631 </p>
632 <dl>
633 <dt>Return:</dt>
634 <dd>
635 flag indicating a valid SSL certificate
636 </dd>
637 </dl>
638 <dl>
639 <dt>Return Type:</dt>
640 <dd>
641 bool
642 </dd>
643 </dl>
644 <a NAME="WebBrowserPage.hitTestContent" ID="WebBrowserPage.hitTestContent"></a>
645 <h4>WebBrowserPage.hitTestContent</h4>
646 <b>hitTestContent</b>(<i>pos</i>)
647
648 <p>
649 Public method to test the content at a specified position.
650 </p>
651 <dl>
652
653 <dt><i>pos</i> (QPoint)</dt>
654 <dd>
655 position to execute the test at
656 </dd>
657 </dl>
658 <dl>
659 <dt>Return:</dt>
660 <dd>
661 test result object
662 </dd>
663 </dl>
664 <dl>
665 <dt>Return Type:</dt>
666 <dd>
667 WebHitTestResult
668 </dd>
669 </dl>
670 <a NAME="WebBrowserPage.icon" ID="WebBrowserPage.icon"></a>
671 <h4>WebBrowserPage.icon</h4>
672 <b>icon</b>(<i></i>)
673
674 <p>
675 Public method to get the web site icon.
676 </p>
677 <dl>
678 <dt>Return:</dt>
679 <dd>
680 web site icon
681 </dd>
682 </dl>
683 <dl>
684 <dt>Return Type:</dt>
685 <dd>
686 QIcon
687 </dd>
688 </dl>
689 <a NAME="WebBrowserPage.isJavaScriptEnabled" ID="WebBrowserPage.isJavaScriptEnabled"></a>
690 <h4>WebBrowserPage.isJavaScriptEnabled</h4>
691 <b>isJavaScriptEnabled</b>(<i></i>)
692
693 <p>
694 Public method to test, if JavaScript is enabled.
695 </p>
696 <dl>
697 <dt>Return:</dt>
698 <dd>
699 flag indicating the state of the JavaScript support
700 </dd>
701 </dl>
702 <dl>
703 <dt>Return Type:</dt>
704 <dd>
705 bool
706 </dd>
707 </dl>
708 <a NAME="WebBrowserPage.javaScriptConsoleMessage" ID="WebBrowserPage.javaScriptConsoleMessage"></a>
709 <h4>WebBrowserPage.javaScriptConsoleMessage</h4>
710 <b>javaScriptConsoleMessage</b>(<i>level, message, lineNumber, sourceId</i>)
711
712 <p>
713 Public method to show a console message.
714 </p>
715 <dl>
716
717 <dt><i>level</i> (QWebEnginePage.JavaScriptConsoleMessageLevel)</dt>
718 <dd>
719 severity
720 </dd>
721 <dt><i>message</i> (str)</dt>
722 <dd>
723 message to be shown
724 </dd>
725 <dt><i>lineNumber</i> (int)</dt>
726 <dd>
727 line number of an error
728 </dd>
729 <dt><i>sourceId</i> (str)</dt>
730 <dd>
731 source URL causing the error
732 </dd>
733 </dl>
734 <a NAME="WebBrowserPage.mapToViewport" ID="WebBrowserPage.mapToViewport"></a>
735 <h4>WebBrowserPage.mapToViewport</h4>
736 <b>mapToViewport</b>(<i>pos</i>)
737
738 <p>
739 Public method to map a position to the viewport.
740 </p>
741 <dl>
742
743 <dt><i>pos</i> (QPoint)</dt>
744 <dd>
745 position to be mapped
746 </dd>
747 </dl>
748 <dl>
749 <dt>Return:</dt>
750 <dd>
751 viewport position
752 </dd>
753 </dl>
754 <dl>
755 <dt>Return Type:</dt>
756 <dd>
757 QPoint
758 </dd>
759 </dl>
760 <a NAME="WebBrowserPage.printCallback" ID="WebBrowserPage.printCallback"></a>
761 <h4>WebBrowserPage.printCallback</h4>
762 <b>printCallback</b>(<i>resDict=resultDict</i>)
763
764 <a NAME="WebBrowserPage.registerProtocolHandlerRequestScheme" ID="WebBrowserPage.registerProtocolHandlerRequestScheme"></a>
765 <h4>WebBrowserPage.registerProtocolHandlerRequestScheme</h4>
766 <b>registerProtocolHandlerRequestScheme</b>(<i></i>)
767
768 <p>
769 Public method to get the registered protocol handler request scheme.
770 </p>
771 <dl>
772 <dt>Return:</dt>
773 <dd>
774 registered protocol handler request scheme
775 </dd>
776 </dl>
777 <dl>
778 <dt>Return Type:</dt>
779 <dd>
780 str
781 </dd>
782 </dl>
783 <a NAME="WebBrowserPage.registerProtocolHandlerRequestUrl" ID="WebBrowserPage.registerProtocolHandlerRequestUrl"></a>
784 <h4>WebBrowserPage.registerProtocolHandlerRequestUrl</h4>
785 <b>registerProtocolHandlerRequestUrl</b>(<i></i>)
786
787 <p>
788 Public method to get the registered protocol handler request URL.
789 </p>
790 <dl>
791 <dt>Return:</dt>
792 <dd>
793 registered protocol handler request URL
794 </dd>
795 </dl>
796 <dl>
797 <dt>Return Type:</dt>
798 <dd>
799 QUrl
800 </dd>
801 </dl>
802 <a NAME="WebBrowserPage.resultCallback" ID="WebBrowserPage.resultCallback"></a>
803 <h4>WebBrowserPage.resultCallback</h4>
804 <b>resultCallback</b>(<i>resDict=resultDict</i>)
805
806 <a NAME="WebBrowserPage.runJavaScript" ID="WebBrowserPage.runJavaScript"></a>
807 <h4>WebBrowserPage.runJavaScript</h4>
808 <b>runJavaScript</b>(<i>script, worldId=-1, callback=None</i>)
809
810 <p>
811 Public method to run a script in the context of the page.
812 </p>
813 <dl>
814
815 <dt><i>script</i> (str)</dt>
816 <dd>
817 JavaScript script source to be executed
818 </dd>
819 <dt><i>worldId</i> (int)</dt>
820 <dd>
821 ID to run the script under
822 </dd>
823 <dt><i>callback</i> (function)</dt>
824 <dd>
825 callback function to be executed when the script has
826 ended
827 </dd>
828 </dl>
829 <a NAME="WebBrowserPage.scroll" ID="WebBrowserPage.scroll"></a>
830 <h4>WebBrowserPage.scroll</h4>
831 <b>scroll</b>(<i>x, y</i>)
832
833 <p>
834 Public method to scroll by the given amount of pixels.
835 </p>
836 <dl>
837
838 <dt><i>x</i> (int)</dt>
839 <dd>
840 horizontal scroll value
841 </dd>
842 <dt><i>y</i> (int)</dt>
843 <dd>
844 vertical scroll value
845 </dd>
846 </dl>
847 <a NAME="WebBrowserPage.scrollPosition" ID="WebBrowserPage.scrollPosition"></a>
848 <h4>WebBrowserPage.scrollPosition</h4>
849 <b>scrollPosition</b>(<i></i>)
850
851 <p>
852 Public method to get the scroll position of the web page.
853 </p>
854 <dl>
855 <dt>Return:</dt>
856 <dd>
857 scroll position
858 </dd>
859 </dl>
860 <dl>
861 <dt>Return Type:</dt>
862 <dd>
863 QPointF
864 </dd>
865 </dl>
866 <a NAME="WebBrowserPage.scrollTo" ID="WebBrowserPage.scrollTo"></a>
867 <h4>WebBrowserPage.scrollTo</h4>
868 <b>scrollTo</b>(<i>pos</i>)
869
870 <p>
871 Public method to scroll to the given position.
872 </p>
873 <dl>
874
875 <dt><i>pos</i> (QPointF)</dt>
876 <dd>
877 position to scroll to
878 </dd>
879 </dl>
880 <a NAME="WebBrowserPage.setSslConfiguration" ID="WebBrowserPage.setSslConfiguration"></a>
881 <h4>WebBrowserPage.setSslConfiguration</h4>
882 <b>setSslConfiguration</b>(<i>sslConfiguration</i>)
883
884 <p>
885 Public slot to set the SSL configuration data of the page.
886 </p>
887 <dl>
888
889 <dt><i>sslConfiguration</i> (QSslConfiguration)</dt>
890 <dd>
891 SSL configuration to be set
892 </dd>
893 </dl>
894 <a NAME="WebBrowserPage.showSslInfo" ID="WebBrowserPage.showSslInfo"></a>
895 <h4>WebBrowserPage.showSslInfo</h4>
896 <b>showSslInfo</b>(<i>pos</i>)
897
898 <p>
899 Public slot to show some SSL information for the loaded page.
900 </p>
901 <dl>
902
903 <dt><i>pos</i> (QPoint)</dt>
904 <dd>
905 position to show the info at
906 </dd>
907 </dl>
908 <div align="right"><a href="#top">Up</a></div>
909 <hr />
910 </body></html>

eric ide

mercurial