class Playwright::Page::EmulateMediaParams

Included Modules

Defined in:

playwright/page.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(media : Playwright::Page::EmulateMediaParams::Media | Nil = nil, color_scheme : Playwright::ColorScheme | Nil = nil) #

[View source]

Instance Method Detail

def 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.


[View source]
def 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.


[View source]
def 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.


[View source]
def 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.


[View source]