@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="VisualViewport")
public class VisualViewport
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
EventHandler |
onresize
The onresize event handler of the VisualViewport interface is called when a viewport is resized, i.e.
|
EventHandler |
onscroll
The onscroll event handler of the VisualViewport interface is called when a viewport is scrolled, i.e.
|
| Modifier | Constructor and Description |
|---|---|
protected |
VisualViewport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResizeListener(EventListener callback) |
void |
addResizeListener(EventListener callback,
AddEventListenerOptions options) |
void |
addResizeListener(EventListener callback,
boolean useCapture) |
void |
addScrollListener(EventListener callback) |
void |
addScrollListener(EventListener callback,
AddEventListenerOptions options) |
void |
addScrollListener(EventListener callback,
boolean useCapture) |
double |
height()
The height read-only property of the VisualViewport interface returns the height of the visual viewport, in CSS pixels.
|
double |
offsetLeft()
The offsetLeft read-only property of the VisualViewport interface returns the offset of the left edge of the visual viewport from the left edge of the layout viewport in CSS pixels.
|
double |
offsetTop()
The offsetTop read-only property of the VisualViewport interface returns the offset of the top edge of the visual viewport from the top edge of the layout viewport in CSS pixels.
|
double |
pageLeft()
The pageLeft read-only property of the VisualViewport interface returns the x coordinate of the left edge of the visual viewport relative to the initial containing block origin, in CSS pixels.
|
double |
pageTop()
The pageTop read-only property of the VisualViewport interface returns the y coordinate of the top edge of the visual viewport relative to the initial containing block origin, in CSS pixels.
|
void |
removeResizeListener(EventListener callback) |
void |
removeResizeListener(EventListener callback,
boolean useCapture) |
void |
removeResizeListener(EventListener callback,
EventListenerOptions options) |
void |
removeScrollListener(EventListener callback) |
void |
removeScrollListener(EventListener callback,
boolean useCapture) |
void |
removeScrollListener(EventListener callback,
EventListenerOptions options) |
double |
scale()
The scale read-only property of the VisualViewport interface returns the pinch-zoom scaling factor applied to the visual viewport.
|
JsArray<DOMRect> |
segments() |
double |
width()
The width read-only property of the VisualViewport interface returns the width of the visual viewport, in CSS pixels.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, values@Nullable public EventHandler onresize
@Nullable public EventHandler onscroll
@JsProperty(name="height") public double height()
@JsProperty(name="offsetLeft") public double offsetLeft()
@JsProperty(name="offsetTop") public double offsetTop()
@JsProperty(name="pageLeft") public double pageLeft()
@JsProperty(name="pageTop") public double pageTop()
@JsProperty(name="scale") public double scale()
@JsProperty(name="width") public double width()
@JsOverlay
public final void addResizeListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addResizeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addResizeListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeResizeListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeResizeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeResizeListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addScrollListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addScrollListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addScrollListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeScrollListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeScrollListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeScrollListener(@Nonnull
EventListener callback)