class

Playwright::Page::EmulateMediaParams

Inherits JSON::Serializable / Reference / Object

Constructors

new(media : Playwright::Page::EmulateMediaParams::Media | Nil = nil, color_scheme : Playwright::ColorScheme | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

color_scheme

Emulates 'prefers-colors-scheme' media feature, supported values are 'light', 'dark', 'no-preference'. Passing null disables color scheme emulation. Omitting colorScheme or passing undefined does not change the emulated value.

Source
color_scheme=(color_scheme : ColorScheme | Nil)

Emulates 'prefers-colors-scheme' media feature, supported values are 'light', 'dark', 'no-preference'. Passing null disables color scheme emulation. Omitting colorScheme or passing undefined does not change the emulated value.

Source
media

Changes the CSS media type of the page. The only allowed values are 'screen', 'print' and null. Passing null disables CSS media emulation. Omitting media or passing undefined does not change the emulated value.

Source
media=(media : Media | Nil)

Changes the CSS media type of the page. The only allowed values are 'screen', 'print' and null. Passing null disables CSS media emulation. Omitting media or passing undefined does not change the emulated value.

Source

Nested types