Skip to content

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

Correct typo in "emulateMedia" call example. (#4592)

Westbrook Johnson7213794a6584
diff --git a/docs/api.md b/docs/api.md
index 79bff66a8a..5af808f966 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -1373,7 +1373,7 @@ await page.evaluate(() => matchMedia('print').matches);
```
```js
-await page.emulateMedia({ colorScheme: 'dark' }] });
+await page.emulateMedia({ colorScheme: 'dark' });
await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
// → true
await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);