blob: e4666d866985018f8a4ed828e1b66c03e7cdd4b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
---
title: VisualViewport.onscroll
slug: Web/API/VisualViewport/onscroll
translation_of: Web/API/VisualViewport/onscroll
---
<p>{{APIRef("Visual Viewport")}}{{ SeeCompatTable() }}</p>
<p>The <strong><code>onscroll</code></strong> event handler of the {{domxref("VisualViewport")}} interface is called when a viewport is scrolled, i.e. when the <code><a href="/en-US/docs/Web/API/VisualViewport/scroll_event">scroll</a></code> event is fired.</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox notranslate">VisualViewport.onscroll = function(e) { ... }</pre>
<h2 id="Examples">Examples</h2>
<pre class="notranslate">VisualViewport.onscroll = function(e) {
...
}</pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Visual Viewport','#dom-visualviewport-onscroll','onscroll')}}</td>
<td>{{Spec2('Visual Viewport')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{Compat("api.VisualViewport.onscroll")}}</p>
|