mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
114 lines
1.3 KiB
Markdown
114 lines
1.3 KiB
Markdown
|
---
|
||
|
sidebar_label: ConsoleMessage
|
||
|
---
|
||
|
|
||
|
# ConsoleMessage class
|
||
|
|
||
|
ConsoleMessage objects are dispatched by page via the 'console' event.
|
||
|
|
||
|
#### Signature:
|
||
|
|
||
|
```typescript
|
||
|
export declare class ConsoleMessage
|
||
|
```
|
||
|
|
||
|
## Constructors
|
||
|
|
||
|
<table><thead><tr><th>
|
||
|
|
||
|
Constructor
|
||
|
|
||
|
</th><th>
|
||
|
|
||
|
Modifiers
|
||
|
|
||
|
</th><th>
|
||
|
|
||
|
Description
|
||
|
|
||
|
</th></tr></thead>
|
||
|
<tbody><tr><td>
|
||
|
|
||
|
[(constructor)(type, text, args, stackTraceLocations)](./puppeteer.consolemessage._constructor_.md)
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
Constructs a new instance of the `ConsoleMessage` class
|
||
|
|
||
|
</td></tr>
|
||
|
</tbody></table>
|
||
|
|
||
|
## Methods
|
||
|
|
||
|
<table><thead><tr><th>
|
||
|
|
||
|
Method
|
||
|
|
||
|
</th><th>
|
||
|
|
||
|
Modifiers
|
||
|
|
||
|
</th><th>
|
||
|
|
||
|
Description
|
||
|
|
||
|
</th></tr></thead>
|
||
|
<tbody><tr><td>
|
||
|
|
||
|
[args()](./puppeteer.consolemessage.args.md)
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
An array of arguments passed to the console.
|
||
|
|
||
|
</td></tr>
|
||
|
<tr><td>
|
||
|
|
||
|
[location()](./puppeteer.consolemessage.location.md)
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
The location of the console message.
|
||
|
|
||
|
</td></tr>
|
||
|
<tr><td>
|
||
|
|
||
|
[stackTrace()](./puppeteer.consolemessage.stacktrace.md)
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
The array of locations on the stack of the console message.
|
||
|
|
||
|
</td></tr>
|
||
|
<tr><td>
|
||
|
|
||
|
[text()](./puppeteer.consolemessage.text.md)
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
The text of the console message.
|
||
|
|
||
|
</td></tr>
|
||
|
<tr><td>
|
||
|
|
||
|
[type()](./puppeteer.consolemessage.type.md)
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
</td><td>
|
||
|
|
||
|
The type of the console message.
|
||
|
|
||
|
</td></tr>
|
||
|
</tbody></table>
|