Skip to main content
Version: Next

ConsoleMessage class

ConsoleMessage objects are dispatched by page via the 'console' event.

Signature​

export declare class ConsoleMessage

Remarks​

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ConsoleMessage class.

Methods​

Method

Modifiers

Description

args()

An array of arguments passed to the console.

frame()

The Frame that initiated the console message, or null if the message originated from a worker.

location()

The location of the console message.

page()

The Page that the console message originated from, or null if the message originated from a worker or outside of a frame context.

stackTrace()

The array of locations on the stack of the console message.

text()

The text of the console message.

type()

The type of the console message.

worker()

The WebWorker that initiated the console message, or null if the message originated from a frame.