# eric7.WebBrowser.WebBrowserJavaScriptConsole

Module implementing a JavaScript console widget.

### Global Attributes

None

### Classes

WebBrowserJavaScriptConsole | Class implementing a JavaScript console widget.

### Functions

None

## WebBrowserJavaScriptConsole

Class implementing a JavaScript console widget.

### Derived from

QTextEdit

### Class Attributes

None

### Class Methods

None

### Methods

WebBrowserJavaScriptConsole | Constructor
__appendText | Private method to append text to the end.
__handleShowContextMenu | Private slot to show the context menu.
javaScriptConsoleMessage | Public method to show a console message.
keyPressEvent | Protected method handling key press events.

### Static Methods

None

#### WebBrowserJavaScriptConsole (Constructor)

WebBrowserJavaScriptConsole(parent=None)

Constructor

parent (QWidget)
  reference to the parent widget

#### WebBrowserJavaScriptConsole.__appendText

__appendText(txt)

Private method to append text to the end.

txt (str)
  text to insert

#### WebBrowserJavaScriptConsole.__handleShowContextMenu

__handleShowContextMenu(coord)

Private slot to show the context menu.

coord (QPoint)
  the position of the mouse pointer

#### WebBrowserJavaScriptConsole.javaScriptConsoleMessage

javaScriptConsoleMessage(level, message, lineNumber, sourceId)

Public method to show a console message.

level (QWebEnginePage.JavaScriptConsoleMessageLevel)
  severity
message (str)
  message to be shown
lineNumber (int)
  line number of an error
sourceId (str)
  source URL causing the error

#### WebBrowserJavaScriptConsole.keyPressEvent

keyPressEvent(evt)

Protected method handling key press events.

evt (QKeyEvent)
  key press event

Up