|
@@ -8,7 +8,7 @@
|
8
|
8
|
|
9
|
9
|
/* eslint-disable react/no-multi-comp */
|
10
|
10
|
|
11
|
|
-import { ReactNode, ReactElement, Component } from 'react';
|
|
11
|
+import { ReactElement, Component } from 'react';
|
12
|
12
|
import {
|
13
|
13
|
NativeSyntheticEvent,
|
14
|
14
|
ViewStyle,
|
|
@@ -512,7 +512,7 @@ export interface WebViewSharedProps extends ViewProps {
|
512
|
512
|
/**
|
513
|
513
|
* Function that returns a view to show if there's an error.
|
514
|
514
|
*/
|
515
|
|
- renderError: (
|
|
515
|
+ renderError?: (
|
516
|
516
|
errorDomain: string | undefined,
|
517
|
517
|
errorCode: number,
|
518
|
518
|
errorDesc: string,
|
|
@@ -521,27 +521,27 @@ export interface WebViewSharedProps extends ViewProps {
|
521
|
521
|
/**
|
522
|
522
|
* Function that returns a loading indicator.
|
523
|
523
|
*/
|
524
|
|
- renderLoading: () => ReactElement;
|
|
524
|
+ renderLoading?: () => ReactElement;
|
525
|
525
|
|
526
|
526
|
/**
|
527
|
527
|
* Function that is invoked when the `WebView` has finished loading.
|
528
|
528
|
*/
|
529
|
|
- onLoad: (event: WebViewNavigationEvent) => void;
|
|
529
|
+ onLoad?: (event: WebViewNavigationEvent) => void;
|
530
|
530
|
|
531
|
531
|
/**
|
532
|
532
|
* Function that is invoked when the `WebView` load succeeds or fails.
|
533
|
533
|
*/
|
534
|
|
- onLoadEnd: (event: WebViewNavigationEvent | WebViewErrorEvent) => void;
|
|
534
|
+ onLoadEnd?: (event: WebViewNavigationEvent | WebViewErrorEvent) => void;
|
535
|
535
|
|
536
|
536
|
/**
|
537
|
537
|
* Function that is invoked when the `WebView` starts loading.
|
538
|
538
|
*/
|
539
|
|
- onLoadStart: (event: WebViewNavigationEvent) => void;
|
|
539
|
+ onLoadStart?: (event: WebViewNavigationEvent) => void;
|
540
|
540
|
|
541
|
541
|
/**
|
542
|
542
|
* Function that is invoked when the `WebView` load fails.
|
543
|
543
|
*/
|
544
|
|
- onError: (event: WebViewErrorEvent) => void;
|
|
544
|
+ onError?: (event: WebViewErrorEvent) => void;
|
545
|
545
|
|
546
|
546
|
/**
|
547
|
547
|
* Function that is invoked when the `WebView` loading starts or ends.
|
|
@@ -608,7 +608,7 @@ export interface WebViewSharedProps extends ViewProps {
|
608
|
608
|
* this whitelist, we will open the URL in Safari.
|
609
|
609
|
* The default whitelisted origins are "http://*" and "https://*".
|
610
|
610
|
*/
|
611
|
|
- originWhitelist: ReadonlyArray<string>;
|
|
611
|
+ originWhitelist?: ReadonlyArray<string>;
|
612
|
612
|
|
613
|
613
|
/**
|
614
|
614
|
* Function that allows custom handling of any web view requests. Return
|
|
@@ -629,5 +629,4 @@ export interface WebViewSharedProps extends ViewProps {
|
629
|
629
|
cacheEnabled?: boolean;
|
630
|
630
|
|
631
|
631
|
style?: StyleProp<ViewStyle>;
|
632
|
|
- children: ReactNode;
|
633
|
632
|
}
|