VisualViewport.onresize

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The onresize event handler of the VisualViewport interface is called when a viewport is resized, i.e. when the resize event is fired.

Syntax

VisualViewport.onresize = function(e) { ... }

Examples

VisualViewport.onresize = function(e) {
  ...
}

Specifications

Specification
Visual Viewport API
# dom-visualviewport-onresize

Browser compatibility

BCD tables only load in the browser