mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs(page): add missing docs on emulateMedia (#6322)
This commit is contained in:
parent
6c04b82256
commit
dec973611c
@ -732,6 +732,8 @@ Optional event-specific initialization properties.
|
||||
|
||||
## async method: Page.emulateMedia
|
||||
|
||||
This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media feature, using the `colorScheme` argument.
|
||||
|
||||
```js
|
||||
await page.evaluate(() => matchMedia('screen').matches);
|
||||
// → true
|
||||
|
||||
3
types/types.d.ts
vendored
3
types/types.d.ts
vendored
@ -1632,6 +1632,9 @@ export interface Page {
|
||||
}): Promise<void>;
|
||||
|
||||
/**
|
||||
* This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
|
||||
* feature, using the `colorScheme` argument.
|
||||
*
|
||||
* ```js
|
||||
* await page.evaluate(() => matchMedia('screen').matches);
|
||||
* // → true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user