Class: Browser::VisualViewport

Inherits:
Object
  • Object
show all
Includes:
Event::Target, Native::Wrapper
Defined in:
opal/browser/visual_viewport.rb

Overview

The mobile web contains two viewports, the Layout and Visual viewport. The Layout viewport is what a page lays out its elements into and the Visual viewport is what is actually visible on the screen. When the user pinch-zooms into the page, the visual viewport shrinks but the layout viewport is unchanged. UI like the on-screen keyboard (OSK) can also shrink the visual viewport without affecting the layout viewport.

https://github.com/WICG/visual-viewport https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport

Instance Attribute Summary collapse

Method Summary

Methods included from Event::Target

#off, #on, #on!, #one, #trigger, #trigger!

Instance Attribute Details

#nativeObject

Returns the value of attribute native


26
27
28
# File 'opal/browser/visual_viewport.rb', line 26

def native
  @native
end