puppeteer/new-docs/puppeteer.target._constructor_.md

25 lines
926 B
Markdown
Raw Normal View History

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Target](./puppeteer.target.md) &gt; [(constructor)](./puppeteer.target._constructor_.md)
## Target.(constructor)
Constructs a new instance of the `Target` class
<b>Signature:</b>
```typescript
constructor(targetInfo: Protocol.Target.TargetInfo, browserContext: BrowserContext, sessionFactory: () => Promise<CDPSession>, ignoreHTTPSErrors: boolean, defaultViewport: Viewport | null);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| targetInfo | Protocol.Target.TargetInfo | |
| browserContext | [BrowserContext](./puppeteer.browsercontext.md) | |
| sessionFactory | () =&gt; Promise&lt;[CDPSession](./puppeteer.cdpsession.md)<!-- -->&gt; | |
| ignoreHTTPSErrors | boolean | |
| defaultViewport | Viewport \| null | |