pub struct SetDeviceMetricsOverrideCommand { /* private fields */ }Emulation and DOM and Page and Runtime only.Expand description
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and “device-width”/“device-height”-related CSS media query results).
Implementations§
Source§impl SetDeviceMetricsOverrideCommand
impl SetDeviceMetricsOverrideCommand
pub fn builder() -> SetDeviceMetricsOverrideCommandBuilder
Sourcepub fn width(&self) -> u32
pub fn width(&self) -> u32
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Sourcepub fn height(&self) -> u32
pub fn height(&self) -> u32
Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Sourcepub fn device_scale_factor(&self) -> f64
pub fn device_scale_factor(&self) -> f64
Overriding device scale factor value. 0 disables the override.
Sourcepub fn mobile(&self) -> bool
pub fn mobile(&self) -> bool
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
Sourcepub fn scale(&self) -> Option<&f64>
Available on crate feature experimental only.
pub fn scale(&self) -> Option<&f64>
experimental only.Scale to apply to resulting view image.
Sourcepub fn screen_width(&self) -> Option<&u32>
Available on crate feature experimental only.
pub fn screen_width(&self) -> Option<&u32>
experimental only.Overriding screen width value in pixels (minimum 0, maximum 10000000).
Sourcepub fn screen_height(&self) -> Option<&u32>
Available on crate feature experimental only.
pub fn screen_height(&self) -> Option<&u32>
experimental only.Overriding screen height value in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_x(&self) -> Option<&u32>
Available on crate feature experimental only.
pub fn position_x(&self) -> Option<&u32>
experimental only.Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_y(&self) -> Option<&u32>
Available on crate feature experimental only.
pub fn position_y(&self) -> Option<&u32>
experimental only.Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn dont_set_visible_size(&self) -> Option<&bool>
Available on crate feature experimental only.
pub fn dont_set_visible_size(&self) -> Option<&bool>
experimental only.Do not set visible view size, rely upon explicit setVisibleSize call.
Sourcepub fn screen_orientation(&self) -> Option<&ScreenOrientation>
pub fn screen_orientation(&self) -> Option<&ScreenOrientation>
Screen orientation override.
Sourcepub fn viewport(&self) -> Option<&Viewport>
Available on crate feature experimental only.
pub fn viewport(&self) -> Option<&Viewport>
experimental only.If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
Sourcepub fn display_feature(&self) -> Option<&DisplayFeature>
Available on crate feature experimental only.
pub fn display_feature(&self) -> Option<&DisplayFeature>
experimental only.If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.
Trait Implementations§
Source§impl Clone for SetDeviceMetricsOverrideCommand
impl Clone for SetDeviceMetricsOverrideCommand
Source§fn clone(&self) -> SetDeviceMetricsOverrideCommand
fn clone(&self) -> SetDeviceMetricsOverrideCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more