# eric6.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
  reference to the parent widget (QWidget)

#### WebBrowserJavaScriptConsole.__appendText

__appendText(txt)

Private method to append text to the end.

txt
  text to insert (string)

#### WebBrowserJavaScriptConsole.__handleShowContextMenu

__handleShowContextMenu(coord)

Private slot to show the context menu.

coord
  the position of the mouse pointer (QPoint)

#### 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
  key press event (QKeyEvent)

Up