mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
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:
committed by
Thibault Malbranche
parent
9c7bf57a9b
commit
a76811da93
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user