7.1.0 (2021-02-12)
TypeScript fixes
Thanks for your patience as we iterate and improve our TypeScript setup. We now should support TypeScript properly across all environments - we do not use export =
which caused issues when compiling TS to ESM. Missing types such as Permission
and ScreenshotOptions
are now present, and we fixed an incorrect type for jsonValue()
.
emulateMediaFeatures
color-gamut support
You can now pass color-gamut options into Page.emulateMediaFeatures
:
await page.emulateMediaFeatures([
{ name: 'color-gamut', value: 'p3' },
]);
await page.evaluate(() => matchMedia('(color-gamut: srgb)').matches);