Closed oscarotero closed 4 months ago
Try
await page.emulateMediaFeatures([{ name: "prefers-color-scheme", value: "dark" }]);
Let me know if that works for you :). I was waiting for someone to ask for this.
It works like a champ! thanks for the fast implementation!
Hi! I'd like to use this library to create screenshots of webpages in light and dark mode. Is there any way to specify the
prefers-color-scheme
option? It would be nice to have a function likepage.setPreferrerColorScheme("dark")
.