diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index 16cbe5bc81..4184b8f4bf 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -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 diff --git a/types/types.d.ts b/types/types.d.ts index 693a1520fb..23dfe075a6 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -1632,6 +1632,9 @@ export interface Page { }): Promise; /** + * 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