|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.WebBrowser.WebBrowserJavaScriptConsole</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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.WebBrowser.WebBrowserJavaScriptConsole</h1> |
|
23 <p> |
|
24 Module implementing a JavaScript console widget. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#WebBrowserJavaScriptConsole">WebBrowserJavaScriptConsole</a></td> |
|
34 <td>Class implementing a JavaScript console widget.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="WebBrowserJavaScriptConsole" ID="WebBrowserJavaScriptConsole"></a> |
|
43 <h2>WebBrowserJavaScriptConsole</h2> |
|
44 <p> |
|
45 Class implementing a JavaScript console widget. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 QTextEdit |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#WebBrowserJavaScriptConsole.__init__">WebBrowserJavaScriptConsole</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#WebBrowserJavaScriptConsole.__appendText">__appendText</a></td> |
|
64 <td>Private method to append text to the end.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#WebBrowserJavaScriptConsole.__handleShowContextMenu">__handleShowContextMenu</a></td> |
|
67 <td>Private slot to show the context menu.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#WebBrowserJavaScriptConsole.javaScriptConsoleMessage">javaScriptConsoleMessage</a></td> |
|
70 <td>Public method to show a console message.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#WebBrowserJavaScriptConsole.keyPressEvent">keyPressEvent</a></td> |
|
73 <td>Protected method handling key press events.</td> |
|
74 </tr> |
|
75 </table> |
|
76 <h3>Static Methods</h3> |
|
77 <table> |
|
78 <tr><td>None</td></tr> |
|
79 </table> |
|
80 <a NAME="WebBrowserJavaScriptConsole.__init__" ID="WebBrowserJavaScriptConsole.__init__"></a> |
|
81 <h4>WebBrowserJavaScriptConsole (Constructor)</h4> |
|
82 <b>WebBrowserJavaScriptConsole</b>(<i>parent=None</i>) |
|
83 <p> |
|
84 Constructor |
|
85 </p><dl> |
|
86 <dt><i>parent</i></dt> |
|
87 <dd> |
|
88 reference to the parent widget (QWidget) |
|
89 </dd> |
|
90 </dl><a NAME="WebBrowserJavaScriptConsole.__appendText" ID="WebBrowserJavaScriptConsole.__appendText"></a> |
|
91 <h4>WebBrowserJavaScriptConsole.__appendText</h4> |
|
92 <b>__appendText</b>(<i>txt</i>) |
|
93 <p> |
|
94 Private method to append text to the end. |
|
95 </p><dl> |
|
96 <dt><i>txt</i></dt> |
|
97 <dd> |
|
98 text to insert (string) |
|
99 </dd> |
|
100 </dl><a NAME="WebBrowserJavaScriptConsole.__handleShowContextMenu" ID="WebBrowserJavaScriptConsole.__handleShowContextMenu"></a> |
|
101 <h4>WebBrowserJavaScriptConsole.__handleShowContextMenu</h4> |
|
102 <b>__handleShowContextMenu</b>(<i>coord</i>) |
|
103 <p> |
|
104 Private slot to show the context menu. |
|
105 </p><dl> |
|
106 <dt><i>coord</i></dt> |
|
107 <dd> |
|
108 the position of the mouse pointer (QPoint) |
|
109 </dd> |
|
110 </dl><a NAME="WebBrowserJavaScriptConsole.javaScriptConsoleMessage" ID="WebBrowserJavaScriptConsole.javaScriptConsoleMessage"></a> |
|
111 <h4>WebBrowserJavaScriptConsole.javaScriptConsoleMessage</h4> |
|
112 <b>javaScriptConsoleMessage</b>(<i>level, message, lineNumber, sourceId</i>) |
|
113 <p> |
|
114 Public method to show a console message. |
|
115 </p><dl> |
|
116 <dt><i>level</i> (QWebEnginePage.JavaScriptConsoleMessageLevel)</dt> |
|
117 <dd> |
|
118 severity |
|
119 </dd><dt><i>message</i> (str)</dt> |
|
120 <dd> |
|
121 message to be shown |
|
122 </dd><dt><i>lineNumber</i> (int)</dt> |
|
123 <dd> |
|
124 line number of an error |
|
125 </dd><dt><i>sourceId</i> (str)</dt> |
|
126 <dd> |
|
127 source URL causing the error |
|
128 </dd> |
|
129 </dl><a NAME="WebBrowserJavaScriptConsole.keyPressEvent" ID="WebBrowserJavaScriptConsole.keyPressEvent"></a> |
|
130 <h4>WebBrowserJavaScriptConsole.keyPressEvent</h4> |
|
131 <b>keyPressEvent</b>(<i>evt</i>) |
|
132 <p> |
|
133 Protected method handling key press events. |
|
134 </p><dl> |
|
135 <dt><i>evt</i></dt> |
|
136 <dd> |
|
137 key press event (QKeyEvent) |
|
138 </dd> |
|
139 </dl> |
|
140 <div align="right"><a href="#top">Up</a></div> |
|
141 <hr /> |
|
142 </body></html> |