VisualViewport.onscroll

Experimental

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

The onscroll event handler of the VisualViewport interface is called when a viewport is scrolled, i.e. when the scroll event is fired.

Syntax

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

Examples

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

Specifications

Specification
Visual Viewport API
# dom-visualviewport-onscroll

Browser compatibility

BCD tables only load in the browser