--- title: VisualViewport.onscroll slug: Web/API/VisualViewport/onscroll translation_of: Web/API/VisualViewport/onscroll ---
{{APIRef("Visual Viewport")}}{{ SeeCompatTable() }}
The onscroll
event handler of the {{domxref("VisualViewport")}} interface is called when a viewport is scrolled, i.e. when the scroll
event is fired.
VisualViewport.onscroll = function(e) { ... }
VisualViewport.onscroll = function(e) { ... }
Specification | Status | Comment |
---|---|---|
{{SpecName('Visual Viewport','#dom-visualviewport-onscroll','onscroll')}} | {{Spec2('Visual Viewport')}} | Initial definition. |
{{Compat("api.VisualViewport.onscroll")}}