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
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
onscroll |
62
61
|
79 |
91
66
|
No |
49
48
|
13 |
62
61
|
62
61
|
68
66
|
46
45
|
13 |
8.0
8.0
|
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport/onscroll