pub struct SetDeviceMetricsOverrideCommand { /* private fields */ }Page and Debugger and DOM and IO and Network and Runtime and experimental 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
👎Deprecated
pub fn width(&self) -> u32
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
Sourcepub fn height(&self) -> u32
👎Deprecated
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
👎Deprecated
pub fn device_scale_factor(&self) -> f64
Overriding device scale factor value. 0 disables the override.
Sourcepub fn mobile(&self) -> bool
👎Deprecated
pub fn mobile(&self) -> bool
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
Sourcepub fn screen_width(&self) -> Option<&u32>
👎Deprecated
pub fn screen_width(&self) -> Option<&u32>
Overriding screen width value in pixels (minimum 0, maximum 10000000).
Sourcepub fn screen_height(&self) -> Option<&u32>
👎Deprecated
pub fn screen_height(&self) -> Option<&u32>
Overriding screen height value in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_x(&self) -> Option<&u32>
👎Deprecated
pub fn position_x(&self) -> Option<&u32>
Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn position_y(&self) -> Option<&u32>
👎Deprecated
pub fn position_y(&self) -> Option<&u32>
Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
Sourcepub fn dont_set_visible_size(&self) -> Option<&bool>
👎Deprecated
pub fn dont_set_visible_size(&self) -> Option<&bool>
Do not set visible view size, rely upon explicit setVisibleSize call.
Sourcepub fn screen_orientation(&self) -> Option<&ScreenOrientation>
👎Deprecated
pub fn screen_orientation(&self) -> Option<&ScreenOrientation>
Screen orientation override.
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