|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.WebBrowser.WebBrowserJavaScriptConsole</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a JavaScript console widget. |
|
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="#WebBrowserJavaScriptConsole">WebBrowserJavaScriptConsole</a></td> |
|
39 <td>Class implementing a JavaScript console widget.</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="WebBrowserJavaScriptConsole" ID="WebBrowserJavaScriptConsole"></a> |
|
50 <h2>WebBrowserJavaScriptConsole</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a JavaScript console widget. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QTextEdit |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#WebBrowserJavaScriptConsole.__init__">WebBrowserJavaScriptConsole</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#WebBrowserJavaScriptConsole.__appendText">__appendText</a></td> |
|
77 <td>Private method to append text to the end.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#WebBrowserJavaScriptConsole.__handleShowContextMenu">__handleShowContextMenu</a></td> |
|
81 <td>Private slot to show the context menu.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#WebBrowserJavaScriptConsole.javaScriptConsoleMessage">javaScriptConsoleMessage</a></td> |
|
85 <td>Public method to show a console message.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#WebBrowserJavaScriptConsole.keyPressEvent">keyPressEvent</a></td> |
|
89 <td>Protected method handling key press events.</td> |
|
90 </tr> |
|
91 </table> |
|
92 <h3>Static Methods</h3> |
|
93 |
|
94 <table> |
|
95 <tr><td>None</td></tr> |
|
96 </table> |
|
97 |
|
98 <a NAME="WebBrowserJavaScriptConsole.__init__" ID="WebBrowserJavaScriptConsole.__init__"></a> |
|
99 <h4>WebBrowserJavaScriptConsole (Constructor)</h4> |
|
100 <b>WebBrowserJavaScriptConsole</b>(<i>parent=None</i>) |
|
101 |
|
102 <p> |
|
103 Constructor |
|
104 </p> |
|
105 <dl> |
|
106 |
|
107 <dt><i>parent</i></dt> |
|
108 <dd> |
|
109 reference to the parent widget (QWidget) |
|
110 </dd> |
|
111 </dl> |
|
112 <a NAME="WebBrowserJavaScriptConsole.__appendText" ID="WebBrowserJavaScriptConsole.__appendText"></a> |
|
113 <h4>WebBrowserJavaScriptConsole.__appendText</h4> |
|
114 <b>__appendText</b>(<i>txt</i>) |
|
115 |
|
116 <p> |
|
117 Private method to append text to the end. |
|
118 </p> |
|
119 <dl> |
|
120 |
|
121 <dt><i>txt</i></dt> |
|
122 <dd> |
|
123 text to insert (string) |
|
124 </dd> |
|
125 </dl> |
|
126 <a NAME="WebBrowserJavaScriptConsole.__handleShowContextMenu" ID="WebBrowserJavaScriptConsole.__handleShowContextMenu"></a> |
|
127 <h4>WebBrowserJavaScriptConsole.__handleShowContextMenu</h4> |
|
128 <b>__handleShowContextMenu</b>(<i>coord</i>) |
|
129 |
|
130 <p> |
|
131 Private slot to show the context menu. |
|
132 </p> |
|
133 <dl> |
|
134 |
|
135 <dt><i>coord</i></dt> |
|
136 <dd> |
|
137 the position of the mouse pointer (QPoint) |
|
138 </dd> |
|
139 </dl> |
|
140 <a NAME="WebBrowserJavaScriptConsole.javaScriptConsoleMessage" ID="WebBrowserJavaScriptConsole.javaScriptConsoleMessage"></a> |
|
141 <h4>WebBrowserJavaScriptConsole.javaScriptConsoleMessage</h4> |
|
142 <b>javaScriptConsoleMessage</b>(<i>level, message, lineNumber, sourceId</i>) |
|
143 |
|
144 <p> |
|
145 Public method to show a console message. |
|
146 </p> |
|
147 <dl> |
|
148 |
|
149 <dt><i>level</i> (QWebEnginePage.JavaScriptConsoleMessageLevel)</dt> |
|
150 <dd> |
|
151 severity |
|
152 </dd> |
|
153 <dt><i>message</i> (str)</dt> |
|
154 <dd> |
|
155 message to be shown |
|
156 </dd> |
|
157 <dt><i>lineNumber</i> (int)</dt> |
|
158 <dd> |
|
159 line number of an error |
|
160 </dd> |
|
161 <dt><i>sourceId</i> (str)</dt> |
|
162 <dd> |
|
163 source URL causing the error |
|
164 </dd> |
|
165 </dl> |
|
166 <a NAME="WebBrowserJavaScriptConsole.keyPressEvent" ID="WebBrowserJavaScriptConsole.keyPressEvent"></a> |
|
167 <h4>WebBrowserJavaScriptConsole.keyPressEvent</h4> |
|
168 <b>keyPressEvent</b>(<i>evt</i>) |
|
169 |
|
170 <p> |
|
171 Protected method handling key press events. |
|
172 </p> |
|
173 <dl> |
|
174 |
|
175 <dt><i>evt</i></dt> |
|
176 <dd> |
|
177 key press event (QKeyEvent) |
|
178 </dd> |
|
179 </dl> |
|
180 <div align="right"><a href="#top">Up</a></div> |
|
181 <hr /> |
|
182 </body></html> |