VisualViewport class
The interface of the Visual Viewport API represents the visual
viewport for a given window. For a page containing iframes, each
iframe, as well as the containing page, will have a unique window
object. Each window on a page will have a unique representing the
properties associated with that window.
You can get a window's visual viewport using
Window.visualViewport
.
Note: Only the top-level window has a visual viewport that's
distinct from the layout viewport. Therefore, it's generally only
the object of the top-level window that's useful. For an
<iframe>
, visual viewport metrics like VisualViewport.width
always correspond to layout viewport metrics like
document.documentElement.clientWidth
.
EventTarget
VisualViewport
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- VisualViewport()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited