feat(iOS): Add callback for webViewWebContentProcessDidTerminate (#774)

* Add callback for WKWebView's onContentProcessDidTerminate

* Add platform information to docs

* Add new WebViewTerminatedEvent type
This commit is contained in:
Samuel Sieg
2019-09-23 10:20:12 +02:00
committed by Thibault Malbranche
parent 9c7bf57a9b
commit a76811da93
5 changed files with 68 additions and 0 deletions
+9
View File
@@ -126,6 +126,8 @@ export type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;
export type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
export type WebViewTerminatedEvent = NativeSyntheticEvent<WebViewNativeEvent>;
export type WebViewHttpErrorEvent = NativeSyntheticEvent<WebViewHttpError>;
export type DataDetectorTypes =
@@ -269,6 +271,7 @@ export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
pagingEnabled?: boolean;
scrollEnabled?: boolean;
useSharedProcessPool?: boolean;
onContentProcessDidTerminate: (event: WebViewTerminatedEvent) => void;
}
export interface IOSWebViewProps extends WebViewSharedProps {
@@ -442,6 +445,12 @@ export interface IOSWebViewProps extends WebViewSharedProps {
* @platform ios
*/
allowingReadAccessToURL?: string;
/**
* Function that is invoked when the WebKit WebView content process gets terminated.
* @platform ios
*/
onContentProcessDidTerminate: (event: WebViewTerminatedEvent) => void;
}
export interface AndroidWebViewProps extends WebViewSharedProps {