puppeteer/docs/api/puppeteer.connection.md

151 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Connection
---
# Connection class
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
2023-09-13 13:47:55 +00:00
export declare class Connection extends EventEmitter<CDPSessionEvents>
2022-07-05 13:41:43 +00:00
```
2023-09-13 13:47:55 +00:00
**Extends:** [EventEmitter](./puppeteer.eventemitter.md)&lt;[CDPSessionEvents](./puppeteer.cdpsessionevents.md)&gt;
2022-07-05 13:41:43 +00:00
## Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
<span id="_constructor_">[(constructor)(url, transport, delay, timeout)](./puppeteer.connection._constructor_.md)</span>
</td><td>
</td><td>
Constructs a new instance of the `Connection` class
</td></tr>
</tbody></table>
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
<span id="timeout">timeout</span>
</td><td>
`readonly`
</td><td>
number
</td><td>
</td></tr>
</tbody></table>
2022-07-05 13:41:43 +00:00
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
<span id="createsession">[createSession(targetInfo)](./puppeteer.connection.createsession.md)</span>
</td><td>
</td><td>
</td></tr>
<tr><td>
<span id="dispose">[dispose()](./puppeteer.connection.dispose.md)</span>
</td><td>
</td><td>
</td></tr>
<tr><td>
<span id="fromsession">[fromSession(session)](./puppeteer.connection.fromsession.md)</span>
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
<span id="send">[send(method, params, options)](./puppeteer.connection.send.md)</span>
</td><td>
</td><td>
</td></tr>
<tr><td>
<span id="session">[session(sessionId)](./puppeteer.connection.session.md)</span>
</td><td>
</td><td>
</td></tr>
<tr><td>
<span id="url">[url()](./puppeteer.connection.url.md)</span>
</td><td>
</td><td>
</td></tr>
</tbody></table>