puppeteer/docs/api/puppeteer.browser.targets.md

22 lines
435 B
Markdown
Raw Permalink Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Browser.targets
---
# Browser.targets() method
2023-09-18 09:05:23 +00:00
Gets all active [targets](./puppeteer.target.md).
In case of multiple [browser contexts](./puppeteer.browsercontext.md), this returns all [targets](./puppeteer.target.md) in all [browser contexts](./puppeteer.browsercontext.md).
2022-07-05 13:41:43 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class Browser {
2023-09-18 09:05:23 +00:00
abstract targets(): Target[];
2022-07-05 13:41:43 +00:00
}
```
**Returns:**
[Target](./puppeteer.target.md)\[\]