This feature is not Baseline because it does not work in some of the most widely-used browsers.
The scrollend event of the VisualViewport interface is fired when a scrolling operation on the visual viewport ends. This allows you to update an element when a scrolling action is completed. For example, you could use the resize and scroll events to keep an element fixed to the visual viewport as it is pinch-zoomed and scrolled, and update it with new content when scrolling ends using scrollend.
Use the event name in methods like addEventListener(), or set an event handler property.
addEventListener("scrollend", (event) => { })
onscrollend = (event) => { }
A generic Event.
See the Visual Viewport API landing page for a usage demo.
| Specification |
|---|
| CSSOM View Module> # eventdef-document-scrollend> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
scrollend_event |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/scrollend_event