|
@@ -17,6 +17,7 @@ This document lays out the current public properties and methods for the React N
|
17
|
17
|
- [`onHttpError`](Reference.md#onhttperror)
|
18
|
18
|
- [`onMessage`](Reference.md#onmessage)
|
19
|
19
|
- [`onNavigationStateChange`](Reference.md#onnavigationstatechange)
|
|
20
|
+- [`onContentProcessDidTerminate`](Reference.md#oncontentprocessdidterminate)
|
20
|
21
|
- [`originWhitelist`](Reference.md#originwhitelist)
|
21
|
22
|
- [`renderError`](Reference.md#rendererror)
|
22
|
23
|
- [`renderLoading`](Reference.md#renderloading)
|
|
@@ -433,6 +434,40 @@ Note that this method will not be invoked on hash URL changes (e.g. from `https:
|
433
|
434
|
|
434
|
435
|
---
|
435
|
436
|
|
|
437
|
+### `onContentProcessDidTerminate`
|
|
438
|
+
|
|
439
|
+Function that is invoked when the `WebView` content process is terminated.
|
|
440
|
+
|
|
441
|
+| Type | Required | Platform |
|
|
442
|
+| -------- | -------- | ------------- |
|
|
443
|
+| function | No | iOS WKWebView |
|
|
444
|
+
|
|
445
|
+Example:
|
|
446
|
+
|
|
447
|
+```jsx
|
|
448
|
+<WebView
|
|
449
|
+ source={{ uri: 'https://facebook.github.io/react-native' }}
|
|
450
|
+ onContentProcessDidTerminate={syntheticEvent => {
|
|
451
|
+ const { nativeEvent } = syntheticEvent;
|
|
452
|
+ console.warn('Content process terminated, reloading', nativeEvent);
|
|
453
|
+ this.refs.webview.reload()
|
|
454
|
+ }}
|
|
455
|
+/>
|
|
456
|
+```
|
|
457
|
+
|
|
458
|
+Function passed to onContentProcessDidTerminate is called with a SyntheticEvent wrapping a nativeEvent with these properties:
|
|
459
|
+
|
|
460
|
+```
|
|
461
|
+canGoBack
|
|
462
|
+canGoForward
|
|
463
|
+loading
|
|
464
|
+target
|
|
465
|
+title
|
|
466
|
+url
|
|
467
|
+```
|
|
468
|
+
|
|
469
|
+---
|
|
470
|
+
|
436
|
471
|
### `originWhitelist`
|
437
|
472
|
|
438
|
473
|
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://*".
|