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
|
## 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
|
```js
|
||||||
await page.evaluate(() => matchMedia('screen').matches);
|
await page.evaluate(() => matchMedia('screen').matches);
|
||||||
// → true
|
// → true
|
||||||
|
|
|
||||||
3
types/types.d.ts
vendored
3
types/types.d.ts
vendored
|
|
@ -1632,6 +1632,9 @@ export interface Page {
|
||||||
}): Promise<void>;
|
}): 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
|
* ```js
|
||||||
* await page.evaluate(() => matchMedia('screen').matches);
|
* await page.evaluate(() => matchMedia('screen').matches);
|
||||||
* // → true
|
* // → true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue