struct Protocol::Page::VisualViewport

Overview

Visual viewport position, dimensions, and scale.

Included Modules

Defined in:

protocol/page.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def client_height : Number::Primitive #

Height (CSS pixels), excludes scrollbar if present.


[View source]
def client_width : Number::Primitive #

Width (CSS pixels), excludes scrollbar if present.


[View source]
def offset_x : Number::Primitive #

Horizontal offset relative to the layout viewport (CSS pixels).


[View source]
def offset_y : Number::Primitive #

Vertical offset relative to the layout viewport (CSS pixels).


[View source]
def page_x : Number::Primitive #

Horizontal offset relative to the document (CSS pixels).


[View source]
def page_y : Number::Primitive #

Vertical offset relative to the document (CSS pixels).


[View source]
def scale : Number::Primitive #

Scale relative to the ideal viewport (size at width=device-width).


[View source]
def zoom : Number::Primitive | Nil #

Page zoom factor (CSS to device independent pixels ratio).


[View source]