Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(docs): remove remaining mentions of Chromium targets (#1435)

Yury Semikhatskyf1d97b0466aa
diff --git a/docs/api.md b/docs/api.md
index eced6a3818..6da215cdef 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -392,7 +392,7 @@ context.clearPermissions();
#### browserContext.close()
- returns: <[Promise]>
-Closes the browser context. All the targets that belong to the browser context
+Closes the browser context. All the pages that belong to the browser context
will be closed.
> **NOTE** the default browser context cannot be closed.
@@ -3767,11 +3767,10 @@ Only one trace can be active at a time per browser.
* extends: [BrowserContext]
-Chromium-specific features including targets, service worker support, etc.
+Chromium-specific features including background pages, service worker support, etc.
```js
-const backroundPageTarget = await context.waitForTarget(target => target.type() === 'background_page');
-const backgroundPage = await backroundPageTarget.page();
+const backgroundPage = await context.waitForEvent('backgroundpage');
```
<!-- GEN:toc -->