class Playwright::Page::EmulateMediaParams
- Playwright::Page::EmulateMediaParams
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
playwright/page.crConstructors
- .new(pull : JSON::PullParser)
- .new(media : Playwright::Page::EmulateMediaParams::Media | Nil = nil, color_scheme : Playwright::ColorScheme | Nil = nil)
Instance Method Summary
-
#color_scheme : ColorScheme | Nil
Emulates
'prefers-colors-scheme'
media feature, supported values are'light'
,'dark'
,'no-preference'
. -
#color_scheme=(color_scheme : ColorScheme | Nil)
Emulates
'prefers-colors-scheme'
media feature, supported values are'light'
,'dark'
,'no-preference'
. -
#media : Media | Nil
Changes the CSS media type of the page.
-
#media=(media : Media | Nil)
Changes the CSS media type of the page.
Constructor Detail
Instance Method Detail
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.
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.
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.
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.