Browse Source

Update documentation

Nizomiddin Toshpulatov 4 years ago
parent
commit
dffe8765d4
1 changed files with 26 additions and 0 deletions
  1. 26
    0
      docs/Reference.md

+ 26
- 0
docs/Reference.md View File

22
 - [`onMessage`](Reference.md#onmessage)
22
 - [`onMessage`](Reference.md#onmessage)
23
 - [`onNavigationStateChange`](Reference.md#onnavigationstatechange)
23
 - [`onNavigationStateChange`](Reference.md#onnavigationstatechange)
24
 - [`onContentProcessDidTerminate`](Reference.md#oncontentprocessdidterminate)
24
 - [`onContentProcessDidTerminate`](Reference.md#oncontentprocessdidterminate)
25
+- [`onScroll`](Reference.md#onscroll)
25
 - [`originWhitelist`](Reference.md#originwhitelist)
26
 - [`originWhitelist`](Reference.md#originwhitelist)
26
 - [`renderError`](Reference.md#rendererror)
27
 - [`renderError`](Reference.md#rendererror)
27
 - [`renderLoading`](Reference.md#renderloading)
28
 - [`renderLoading`](Reference.md#renderloading)
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
 ### `originWhitelist`[⬆](#props-index)<!-- Link generated with jump2header -->
606
 ### `originWhitelist`[⬆](#props-index)<!-- Link generated with jump2header -->
581
 
607
 
582
 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://*".
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://*".