|
@@ -22,6 +22,7 @@ This document lays out the current public properties and methods for the React N
|
22
|
22
|
- [`onMessage`](Reference.md#onmessage)
|
23
|
23
|
- [`onNavigationStateChange`](Reference.md#onnavigationstatechange)
|
24
|
24
|
- [`onContentProcessDidTerminate`](Reference.md#oncontentprocessdidterminate)
|
|
25
|
+- [`onScroll`](Reference.md#onscroll)
|
25
|
26
|
- [`originWhitelist`](Reference.md#originwhitelist)
|
26
|
27
|
- [`renderError`](Reference.md#rendererror)
|
27
|
28
|
- [`renderLoading`](Reference.md#renderloading)
|
|
@@ -577,6 +578,31 @@ url
|
577
|
578
|
|
578
|
579
|
---
|
579
|
580
|
|
|
581
|
+### `onScroll`[⬆](#props-index)<!-- Link generated with jump2header -->
|
|
582
|
+
|
|
583
|
+Function that is invoked when the scroll event is fired in the `WebView`.
|
|
584
|
+
|
|
585
|
+| Type | Required | Platform |
|
|
586
|
+| -------- | -------- | ----------------------- |
|
|
587
|
+| function | No | iOS, macOS, Android, Windows |
|
|
588
|
+
|
|
589
|
+Example:
|
|
590
|
+
|
|
591
|
+```jsx
|
|
592
|
+<Webview
|
|
593
|
+ source={{ uri: 'https://reactnative.dev' }}
|
|
594
|
+ onScroll={syntheticEvent => {
|
|
595
|
+ const { contentOffset } = syntheticEvent.nativeEvent
|
|
596
|
+ console.table(contentOffset)
|
|
597
|
+ }}
|
|
598
|
+/>
|
|
599
|
+```
|
|
600
|
+
|
|
601
|
+Function will receive event object of `NativeSyntheticEvent<NativeScrollEvent>`
|
|
602
|
+type as an argument.
|
|
603
|
+
|
|
604
|
+---
|
|
605
|
+
|
580
|
606
|
### `originWhitelist`[⬆](#props-index)<!-- Link generated with jump2header -->
|
581
|
607
|
|
582
|
608
|
List of origin strings to allow being navigated to. The strings allow wildcards and get matched against _just_ the origin (not the full URL). If the user taps to navigate to a new page but the new page is not in this whitelist, the URL will be handled by the OS. The default whitelisted origins are "http://*" and "https://*".
|