@exodus/react-native-webview 11.26.1-exodus.9 → 13.16.0-exodus.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +36 -63
  2. package/android/build.gradle +83 -110
  3. package/android/gradle.properties +3 -4
  4. package/android/src/main/AndroidManifest.xml +12 -0
  5. package/android/src/main/AndroidManifestNew.xml +26 -0
  6. package/android/src/main/java/com/reactnativecommunity/webview/RNCBasicAuthCredential.java +11 -0
  7. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebChromeClient.java +407 -0
  8. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebView.java +468 -0
  9. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewClient.java +330 -0
  10. package/android/src/main/java/com/reactnativecommunity/webview/{WebViewConfig.java → RNCWebViewConfig.java} +3 -4
  11. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewFileProvider.java +1 -1
  12. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManagerImpl.kt +746 -0
  13. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewMessagingModule.kt +9 -0
  14. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModuleImpl.java +554 -0
  15. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewPackage.java +57 -12
  16. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewWrapper.kt +39 -0
  17. package/android/src/main/java/com/reactnativecommunity/webview/events/SubResourceErrorEvent.kt +25 -0
  18. package/android/src/main/java/com/reactnativecommunity/webview/events/TopCustomMenuSelectionEvent.kt +24 -0
  19. package/android/src/main/java/com/reactnativecommunity/webview/events/TopHttpErrorEvent.kt +25 -0
  20. package/android/src/main/java/com/reactnativecommunity/webview/events/TopNewWindowEvent.kt +25 -0
  21. package/android/src/main/java/com/reactnativecommunity/webview/events/TopRenderProcessGoneEvent.kt +25 -0
  22. package/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java +570 -0
  23. package/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewModule.java +57 -0
  24. package/android/src/oldarch/com/reactnativecommunity/webview/RNCWebViewManager.java +341 -0
  25. package/android/src/oldarch/com/reactnativecommunity/webview/RNCWebViewModule.java +59 -0
  26. package/apple/RCTConvert+WKDataDetectorTypes.h +11 -0
  27. package/apple/RCTConvert+WKDataDetectorTypes.m +27 -0
  28. package/apple/RNCWebView.h +26 -100
  29. package/apple/RNCWebView.mm +555 -0
  30. package/apple/RNCWebViewDecisionManager.h +20 -0
  31. package/apple/RNCWebViewDecisionManager.m +47 -0
  32. package/apple/RNCWebViewImpl.h +164 -0
  33. package/apple/{RNCWebView.m → RNCWebViewImpl.m} +803 -226
  34. package/apple/RNCWebViewManager.h +4 -8
  35. package/apple/RNCWebViewManager.mm +221 -0
  36. package/apple/RNCWebViewModule.h +23 -0
  37. package/apple/RNCWebViewModule.mm +34 -0
  38. package/index.d.ts +2 -3
  39. package/lib/NativeRNCWebViewModule.d.ts +8 -0
  40. package/lib/NativeRNCWebViewModule.js +1 -0
  41. package/lib/RNCWebViewNativeComponent.d.ts +245 -0
  42. package/lib/RNCWebViewNativeComponent.js +1 -0
  43. package/lib/WebView.android.d.ts +0 -1
  44. package/lib/WebView.android.js +1 -135
  45. package/lib/WebView.d.ts +2 -3
  46. package/lib/WebView.ios.d.ts +0 -1
  47. package/lib/WebView.ios.js +1 -114
  48. package/lib/WebView.js +1 -11
  49. package/lib/WebView.macos.d.ts +6 -0
  50. package/lib/WebView.macos.js +1 -0
  51. package/lib/WebView.styles.d.ts +37 -11
  52. package/lib/WebView.styles.js +1 -33
  53. package/lib/WebView.windows.d.ts +17 -0
  54. package/lib/WebView.windows.js +1 -0
  55. package/lib/WebViewNativeComponent.macos.d.ts +3 -0
  56. package/lib/WebViewNativeComponent.macos.js +1 -0
  57. package/lib/WebViewNativeComponent.windows.d.ts +3 -0
  58. package/lib/WebViewNativeComponent.windows.js +1 -0
  59. package/lib/WebViewShared.d.ts +30 -9
  60. package/lib/WebViewShared.js +1 -174
  61. package/lib/WebViewTypes.d.ts +514 -98
  62. package/lib/WebViewTypes.js +1 -6
  63. package/lib/index.d.ts +0 -1
  64. package/lib/index.js +1 -3
  65. package/lib/validation.d.ts +3 -0
  66. package/lib/validation.js +1 -0
  67. package/package.json +57 -33
  68. package/react-native-webview.podspec +32 -5
  69. package/react-native.config.js +22 -18
  70. package/src/NativeRNCWebViewModule.ts +13 -0
  71. package/src/RNCWebViewNativeComponent.ts +348 -0
  72. package/src/WebView.android.tsx +345 -0
  73. package/src/WebView.ios.tsx +341 -0
  74. package/src/WebView.macos.tsx +252 -0
  75. package/src/WebView.styles.ts +41 -0
  76. package/src/WebView.tsx +25 -0
  77. package/src/WebView.windows.tsx +217 -0
  78. package/src/WebViewNativeComponent.macos.ts +7 -0
  79. package/src/WebViewNativeComponent.windows.ts +8 -0
  80. package/src/WebViewShared.tsx +476 -0
  81. package/src/WebViewTypes.ts +1402 -0
  82. package/src/__tests__/WebViewShared-test.js +323 -0
  83. package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +8 -0
  84. package/src/__tests__/validation-test.js +38 -0
  85. package/src/index.ts +4 -0
  86. package/src/validation.ts +20 -0
  87. package/android/.editorconfig +0 -6
  88. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +0 -1408
  89. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java +0 -506
  90. package/apple/RNCWebViewManager.m +0 -278
  91. package/lib/WebViewNativeComponent.android.d.ts +0 -4
  92. package/lib/WebViewNativeComponent.android.js +0 -3
  93. package/lib/WebViewNativeComponent.ios.d.ts +0 -4
  94. package/lib/WebViewNativeComponent.ios.js +0 -3
@@ -1,7 +1,8 @@
1
- import { ReactElement, Component, ElementType } from 'react';
2
- import { NativeSyntheticEvent, ViewProps, StyleProp, ViewStyle, NativeMethodsMixin, Constructor, UIManagerStatic, NativeScrollEvent } from 'react-native';
3
- declare type WebViewCommands = 'goForward' | 'goBack' | 'reload' | 'stopLoading' | 'postMessage' | 'injectJavaScript' | 'loadUrl' | 'requestFocus';
4
- declare type AndroidWebViewCommands = 'clearHistory' | 'clearCache' | 'clearFormData';
1
+ import { ReactElement, Component, ComponentProps, ElementType } from 'react';
2
+ import { NativeSyntheticEvent, ViewProps, StyleProp, ViewStyle, NativeMethodsMixin, UIManagerStatic, NativeScrollEvent } from 'react-native';
3
+ import type NativeWebViewComponent from './RNCWebViewNativeComponent';
4
+ type WebViewCommands = 'goForward' | 'goBack' | 'reload' | 'stopLoading' | 'postMessage' | 'injectJavaScript' | 'loadUrl' | 'requestFocus' | 'clearCache';
5
+ type AndroidWebViewCommands = 'clearHistory' | 'clearFormData';
5
6
  interface RNCWebViewUIManager<Commands extends string> extends UIManagerStatic {
6
7
  getViewManagerConfig: (name: string) => {
7
8
  Commands: {
@@ -9,9 +10,11 @@ interface RNCWebViewUIManager<Commands extends string> extends UIManagerStatic {
9
10
  };
10
11
  };
11
12
  }
12
- export declare type RNCWebViewUIManagerAndroid = RNCWebViewUIManager<WebViewCommands | AndroidWebViewCommands>;
13
- export declare type RNCWebViewUIManagerIOS = RNCWebViewUIManager<WebViewCommands>;
14
- declare type WebViewState = 'IDLE' | 'LOADING' | 'ERROR';
13
+ export type RNCWebViewUIManagerAndroid = RNCWebViewUIManager<WebViewCommands | AndroidWebViewCommands>;
14
+ export type RNCWebViewUIManagerIOS = RNCWebViewUIManager<WebViewCommands>;
15
+ export type RNCWebViewUIManagerMacOS = RNCWebViewUIManager<WebViewCommands>;
16
+ export type RNCWebViewUIManagerWindows = RNCWebViewUIManager<WebViewCommands>;
17
+ type WebViewState = 'IDLE' | 'LOADING' | 'ERROR';
15
18
  interface BaseState {
16
19
  viewState: WebViewState;
17
20
  }
@@ -23,16 +26,17 @@ interface ErrorState extends BaseState {
23
26
  viewState: 'ERROR';
24
27
  lastErrorEvent: WebViewError;
25
28
  }
26
- export declare type State = NormalState | ErrorState;
27
- declare class NativeWebViewIOSComponent extends Component<IOSNativeWebViewProps> {
29
+ export type State = NormalState | ErrorState;
30
+ type Constructor<T> = new (...args: any[]) => T;
31
+ declare class NativeWebViewMacOSComponent extends Component<MacOSNativeWebViewProps> {
28
32
  }
29
- declare const NativeWebViewIOSBase: Constructor<NativeMethodsMixin> & typeof NativeWebViewIOSComponent;
30
- export declare class NativeWebViewIOS extends NativeWebViewIOSBase {
33
+ declare const NativeWebViewMacOSBase: Constructor<NativeMethodsMixin> & typeof NativeWebViewMacOSComponent;
34
+ export declare class NativeWebViewMacOS extends NativeWebViewMacOSBase {
31
35
  }
32
- declare class NativeWebViewAndroidComponent extends Component<AndroidNativeWebViewProps> {
36
+ declare class NativeWebViewWindowsComponent extends Component<WindowsNativeWebViewProps> {
33
37
  }
34
- declare const NativeWebViewAndroidBase: Constructor<NativeMethodsMixin> & typeof NativeWebViewAndroidComponent;
35
- export declare class NativeWebViewAndroid extends NativeWebViewAndroidBase {
38
+ declare const NativeWebViewWindowsBase: Constructor<NativeMethodsMixin> & typeof NativeWebViewWindowsComponent;
39
+ export declare class NativeWebViewWindows extends NativeWebViewWindowsBase {
36
40
  }
37
41
  export interface ContentInsetProp {
38
42
  top?: number;
@@ -58,7 +62,10 @@ export interface WebViewNavigation extends WebViewNativeEvent {
58
62
  export interface ShouldStartLoadRequest extends WebViewNavigation {
59
63
  isTopFrame: boolean;
60
64
  }
61
- export declare type DecelerationRateConstant = 'normal' | 'fast';
65
+ export interface FileDownload {
66
+ downloadUrl: string;
67
+ }
68
+ export type DecelerationRateConstant = 'normal' | 'fast';
62
69
  export interface WebViewMessage extends WebViewNativeEvent {
63
70
  data: string;
64
71
  }
@@ -70,17 +77,33 @@ export interface WebViewError extends WebViewNativeEvent {
70
77
  code: number;
71
78
  description: string;
72
79
  }
73
- export declare type WebViewEvent = NativeSyntheticEvent<WebViewNativeEvent>;
74
- export declare type WebViewProgressEvent = NativeSyntheticEvent<WebViewNativeProgressEvent>;
75
- export declare type WebViewNavigationEvent = NativeSyntheticEvent<WebViewNavigation>;
76
- export declare type ShouldStartLoadRequestEvent = NativeSyntheticEvent<ShouldStartLoadRequest>;
77
- export declare type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;
78
- export declare type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
79
- export declare type WebViewScrollEvent = NativeSyntheticEvent<NativeScrollEvent>;
80
- export declare type DataDetectorTypes = 'phoneNumber' | 'link' | 'address' | 'calendarEvent' | 'trackingNumber' | 'flightNumber' | 'lookupSuggestion' | 'none' | 'all';
81
- export declare type OverScrollModeType = 'always' | 'content' | 'never';
82
- export declare type CacheMode = 'LOAD_DEFAULT' | 'LOAD_CACHE_ONLY' | 'LOAD_CACHE_ELSE_NETWORK' | 'LOAD_NO_CACHE';
83
- export declare type AndroidLayerType = 'none' | 'software' | 'hardware';
80
+ export interface WebViewHttpError extends WebViewNativeEvent {
81
+ description: string;
82
+ statusCode: number;
83
+ }
84
+ export interface WebViewRenderProcessGoneDetail {
85
+ didCrash: boolean;
86
+ }
87
+ export interface WebViewOpenWindow {
88
+ targetUrl: string;
89
+ }
90
+ export type WebViewEvent = NativeSyntheticEvent<WebViewNativeEvent>;
91
+ export type WebViewProgressEvent = NativeSyntheticEvent<WebViewNativeProgressEvent>;
92
+ export type WebViewNavigationEvent = NativeSyntheticEvent<WebViewNavigation>;
93
+ export type ShouldStartLoadRequestEvent = NativeSyntheticEvent<ShouldStartLoadRequest>;
94
+ export type FileDownloadEvent = NativeSyntheticEvent<FileDownload>;
95
+ export type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;
96
+ export type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
97
+ export type WebViewTerminatedEvent = NativeSyntheticEvent<WebViewNativeEvent>;
98
+ export type WebViewHttpErrorEvent = NativeSyntheticEvent<WebViewHttpError>;
99
+ export type WebViewRenderProcessGoneEvent = NativeSyntheticEvent<WebViewRenderProcessGoneDetail>;
100
+ export type WebViewOpenWindowEvent = NativeSyntheticEvent<WebViewOpenWindow>;
101
+ export type WebViewScrollEvent = NativeSyntheticEvent<NativeScrollEvent>;
102
+ export type DataDetectorTypes = 'phoneNumber' | 'link' | 'address' | 'calendarEvent' | 'trackingNumber' | 'flightNumber' | 'lookupSuggestion' | 'none' | 'all';
103
+ export type OverScrollModeType = 'always' | 'content' | 'never';
104
+ export type CacheMode = 'LOAD_DEFAULT' | 'LOAD_CACHE_ONLY' | 'LOAD_CACHE_ELSE_NETWORK' | 'LOAD_NO_CACHE';
105
+ export type AndroidLayerType = 'none' | 'software' | 'hardware';
106
+ export type IndicatorStyleType = 'default' | 'black' | 'white';
84
107
  export interface WebViewSourceUri {
85
108
  /**
86
109
  * The URI to load in the `WebView`. Can be a local or remote file.
@@ -125,11 +148,28 @@ export interface WebViewCustomMenuItems {
125
148
  */
126
149
  label: string;
127
150
  }
128
- export declare type WebViewSource = WebViewSourceUri | WebViewSourceHtml;
151
+ export declare type SuppressMenuItem = 'cut' | 'copy' | 'paste' | 'replace' | 'bold' | 'italic' | 'underline' | 'select' | 'selectAll' | 'translate' | 'lookup' | 'share';
152
+ export type WebViewSource = WebViewSourceUri | WebViewSourceHtml;
129
153
  export interface ViewManager {
130
- startLoadWithResult: Function;
154
+ shouldStartLoadWithLockIdentifier: Function;
155
+ }
156
+ export interface WebViewNativeConfig {
157
+ /**
158
+ * The native component used to render the WebView.
159
+ */
160
+ component?: typeof NativeWebViewMacOS | typeof NativeWebViewComponent;
161
+ /**
162
+ * Set props directly on the native component WebView. Enables custom props which the
163
+ * original WebView doesn't pass through.
164
+ */
165
+ props?: Object;
166
+ /**
167
+ * Set the ViewManager to use for communication with the native side.
168
+ * @platform ios, macos
169
+ */
170
+ viewManager?: ViewManager;
131
171
  }
132
- export declare type OnShouldStartLoadWithRequest = (event: ShouldStartLoadRequest) => boolean;
172
+ export type OnShouldStartLoadWithRequest = (event: ShouldStartLoadRequest) => boolean;
133
173
  export interface BasicAuthCredential {
134
174
  /**
135
175
  * A username used for basic authentication.
@@ -145,76 +185,91 @@ export interface CommonNativeWebViewProps extends ViewProps {
145
185
  incognito?: boolean;
146
186
  injectedJavaScript?: string;
147
187
  injectedJavaScriptBeforeContentLoaded?: string;
188
+ injectedJavaScriptForMainFrameOnly?: boolean;
189
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
190
+ javaScriptCanOpenWindowsAutomatically?: boolean;
148
191
  mediaPlaybackRequiresUserAction?: boolean;
192
+ webviewDebuggingEnabled?: boolean;
149
193
  messagingEnabled: boolean;
194
+ /**
195
+ * Exodus: List of origins allowed to request camera/microphone permissions.
196
+ * Only URLs from these origins will be allowed to access camera/microphone.
197
+ */
198
+ cameraPermissionOriginWhitelist?: readonly string[];
150
199
  onScroll?: (event: WebViewScrollEvent) => void;
151
200
  onLoadingError: (event: WebViewErrorEvent) => void;
152
201
  onLoadingFinish: (event: WebViewNavigationEvent) => void;
153
202
  onLoadingProgress: (event: WebViewProgressEvent) => void;
154
203
  onLoadingStart: (event: WebViewNavigationEvent) => void;
204
+ onHttpError: (event: WebViewHttpErrorEvent) => void;
155
205
  onMessage: (event: WebViewMessageEvent) => void;
156
206
  onShouldStartLoadWithRequest: (event: ShouldStartLoadRequestEvent) => void;
157
207
  showsHorizontalScrollIndicator?: boolean;
158
208
  showsVerticalScrollIndicator?: boolean;
209
+ paymentRequestEnabled?: boolean;
159
210
  source: any;
160
211
  userAgent?: string;
161
212
  /**
162
213
  * Append to the existing user-agent. Overridden if `userAgent` is set.
163
214
  */
215
+ applicationNameForUserAgent?: string;
164
216
  basicAuthCredential?: BasicAuthCredential;
165
217
  }
166
- export interface AndroidNativeWebViewProps extends CommonNativeWebViewProps {
167
- cacheMode?: CacheMode;
168
- scalesPageToFit?: boolean;
169
- androidHardwareAccelerationDisabled?: boolean;
170
- androidLayerType?: AndroidLayerType;
171
- domStorageEnabled?: boolean;
172
- geolocationEnabled?: boolean;
173
- javaScriptEnabled?: boolean;
174
- mixedContentMode?: 'never' | 'always' | 'compatibility';
175
- onContentSizeChange?: (event: WebViewEvent) => void;
176
- overScrollMode?: OverScrollModeType;
177
- saveFormDataDisabled?: boolean;
178
- setSupportMultipleWindows?: boolean;
179
- textZoom?: number;
180
- thirdPartyCookiesEnabled?: boolean;
181
- messagingModuleName?: string;
182
- setBuiltInZoomControls?: boolean;
183
- setDisplayZoomControls?: boolean;
184
- nestedScrollEnabled?: boolean;
185
- readonly urlPrefixesForDefaultIntent?: string[];
186
- forceDarkOn?: boolean;
187
- minimumFontSize?: number;
188
- downloadingMessage?: string;
189
- lackPermissionToDownloadMessage?: string;
190
- allowsProtectedMedia?: boolean;
191
- }
192
218
  export declare type ContentInsetAdjustmentBehavior = 'automatic' | 'scrollableAxes' | 'never' | 'always';
193
219
  export declare type MediaCapturePermissionGrantType = 'grantIfSameHostElsePrompt' | 'grantIfSameHostElseDeny' | 'deny' | 'grant' | 'prompt';
194
220
  export declare type ContentMode = 'recommended' | 'mobile' | 'desktop';
195
- export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
221
+ export interface MacOSNativeWebViewProps extends CommonNativeWebViewProps {
222
+ allowingReadAccessToURL?: string;
223
+ allowFileAccessFromFileURLs?: boolean;
224
+ allowUniversalAccessFromFileURLs?: boolean;
196
225
  allowsBackForwardNavigationGestures?: boolean;
197
226
  allowsInlineMediaPlayback?: boolean;
227
+ allowsPictureInPictureMediaPlayback?: boolean;
228
+ allowsAirPlayForMediaPlayback?: boolean;
198
229
  allowsLinkPreview?: boolean;
199
230
  automaticallyAdjustContentInsets?: boolean;
200
- autoManageStatusBarEnabled?: boolean;
201
231
  bounces?: boolean;
202
232
  contentInset?: ContentInsetProp;
203
233
  contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
204
- contentMode?: ContentMode;
205
- readonly dataDetectorTypes?: DataDetectorTypes | DataDetectorTypes[];
206
- decelerationRate?: number;
207
234
  directionalLockEnabled?: boolean;
208
235
  hideKeyboardAccessoryView?: boolean;
209
236
  javaScriptEnabled?: boolean;
210
237
  pagingEnabled?: boolean;
211
238
  scrollEnabled?: boolean;
212
239
  useSharedProcessPool?: boolean;
213
- limitsNavigationsToAppBoundDomains?: boolean;
214
- sharedCookiesEnabled?: boolean;
215
- enableApplePay?: boolean;
216
- textInteractionEnabled?: boolean;
217
- mediaCapturePermissionGrantType?: MediaCapturePermissionGrantType;
240
+ onContentProcessDidTerminate?: (event: WebViewTerminatedEvent) => void;
241
+ }
242
+ export interface WindowsNativeWebViewProps extends CommonNativeWebViewProps {
243
+ testID?: string;
244
+ linkHandlingEnabled?: boolean;
245
+ onOpenWindow?: (event: WebViewOpenWindowEvent) => void;
246
+ onSourceChanged?: (event: WebViewNavigationEvent) => void;
247
+ }
248
+ export interface WindowsWebViewProps extends WebViewSharedProps {
249
+ /**
250
+ * Boolean value that detenmines whether the web view should use the new chromium based edge webview.
251
+ */
252
+ useWebView2?: boolean;
253
+ /**
254
+ * Function that is invoked when the `WebView` should open a new window.
255
+ *
256
+ * This happens when the JS calls `window.open('http://someurl', '_blank')`
257
+ * or when the user clicks on a `<a href="http://someurl" target="_blank">` link.
258
+ *
259
+ * Only works with `useWebView2` set to `true`.
260
+ *
261
+ * @platform windows
262
+ */
263
+ onOpenWindow?: (event: WebViewOpenWindowEvent) => void;
264
+ /**
265
+ * Function that is invoked when the `WebView` responds to a request to load a new resource.
266
+ * Works only on Windows.
267
+ *
268
+ * Only works with `useWebView2` set to `true`.
269
+ *
270
+ * @platform windows
271
+ */
272
+ onSourceChanged?: (event: WebViewNavigationEvent) => void;
218
273
  }
219
274
  export interface IOSWebViewProps extends WebViewSharedProps {
220
275
  /**
@@ -247,7 +302,7 @@ export interface IOSWebViewProps extends WebViewSharedProps {
247
302
  scrollEnabled?: boolean;
248
303
  /**
249
304
  * If the value of this property is true, the scroll view stops on multiples
250
- * of the scroll views bounds when the user scrolls.
305
+ * of the scroll view's bounds when the user scrolls.
251
306
  * The default value is false.
252
307
  * @platform ios
253
308
  */
@@ -322,6 +377,18 @@ export interface IOSWebViewProps extends WebViewSharedProps {
322
377
  * @platform ios
323
378
  */
324
379
  allowsInlineMediaPlayback?: boolean;
380
+ /**
381
+ * Boolean value that indicates whether HTML5 videos can play Picture in Picture.
382
+ * The default value is `true`.
383
+ *
384
+ * @platform macos
385
+ */
386
+ allowsPictureInPictureMediaPlayback?: boolean;
387
+ /**
388
+ * A Boolean value indicating whether AirPlay is allowed. The default value is `false`.
389
+ * @platform ios
390
+ */
391
+ allowsAirPlayForMediaPlayback?: boolean;
325
392
  /**
326
393
  * Hide the accessory view when the keyboard is open. Default is false to be
327
394
  * backward compatible.
@@ -341,6 +408,7 @@ export interface IOSWebViewProps extends WebViewSharedProps {
341
408
  useSharedProcessPool?: boolean;
342
409
  /**
343
410
  * The custom user agent string.
411
+ * @platform ios
344
412
  */
345
413
  userAgent?: string;
346
414
  /**
@@ -358,6 +426,12 @@ export interface IOSWebViewProps extends WebViewSharedProps {
358
426
  * @platform ios
359
427
  */
360
428
  sharedCookiesEnabled?: boolean;
429
+ /**
430
+ * When set to true the hardware silent switch is ignored.
431
+ * The default value is `false`.
432
+ * @platform ios
433
+ */
434
+ ignoreSilentHardwareSwitch?: boolean;
361
435
  /**
362
436
  * Set true if StatusBar should be light when user watch video fullscreen.
363
437
  * The default value is `true`.
@@ -382,6 +456,56 @@ export interface IOSWebViewProps extends WebViewSharedProps {
382
456
  * @platform ios
383
457
  */
384
458
  keyboardDisplayRequiresUserAction?: boolean;
459
+ /**
460
+ * A String value that indicates which URLs the WebView's file can then
461
+ * reference in scripts, AJAX requests, and CSS imports. This is only used
462
+ * for WebViews that are loaded with a source.uri set to a `'file://'` URL.
463
+ *
464
+ * If not provided, the default is to only allow read access to the URL
465
+ * provided in source.uri itself.
466
+ * @platform ios
467
+ */
468
+ allowingReadAccessToURL?: string;
469
+ /**
470
+ * Boolean that sets whether JavaScript running in the context of a file
471
+ * scheme URL should be allowed to access content from other file scheme URLs.
472
+ * Including accessing content from other file scheme URLs
473
+ * @platform ios
474
+ */
475
+ allowFileAccessFromFileURLs?: boolean;
476
+ /**
477
+ * Boolean that sets whether JavaScript running in the context of a file
478
+ * scheme URL should be allowed to access content from any origin.
479
+ * Including accessing content from other file scheme URLs
480
+ * @platform ios
481
+ */
482
+ allowUniversalAccessFromFileURLs?: boolean;
483
+ /**
484
+ * Function that is invoked when the WebKit WebView content process gets terminated.
485
+ * @platform ios
486
+ */
487
+ onContentProcessDidTerminate?: (event: WebViewTerminatedEvent) => void;
488
+ /**
489
+ * Function that is invoked when the `WebView` should open a new window.
490
+ *
491
+ * This happens when the JS calls `window.open('http://someurl', '_blank')`
492
+ * or when the user clicks on a `<a href="http://someurl" target="_blank">` link.
493
+ *
494
+ * @platform ios
495
+ */
496
+ onOpenWindow?: (event: WebViewOpenWindowEvent) => void;
497
+ /**
498
+ * If `true` (default), loads the `injectedJavaScript` only into the main frame.
499
+ * If `false`, loads it into all frames (e.g. iframes).
500
+ * @platform ios
501
+ */
502
+ injectedJavaScriptForMainFrameOnly?: boolean;
503
+ /**
504
+ * If `true` (default), loads the `injectedJavaScriptBeforeContentLoaded` only into the main frame.
505
+ * If `false`, loads it into all frames (e.g. iframes).
506
+ * @platform ios
507
+ */
508
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
385
509
  /**
386
510
  * Boolean value that determines whether a pull to refresh gesture is
387
511
  * available in the `WebView`. The default value is `false`.
@@ -390,12 +514,48 @@ export interface IOSWebViewProps extends WebViewSharedProps {
390
514
  *
391
515
  */
392
516
  pullToRefreshEnabled?: boolean;
517
+ /**
518
+ * Boolean value that determines whether the refresh control color is white or not.
519
+ * The default value is `false`, meaning the refresh control color will be the default.
520
+ * @platform ios
521
+ *
522
+ */
523
+ refreshControlLightMode?: boolean;
524
+ /**
525
+ * Determines the style of the scroll indicators. This property works the same
526
+ * as `indicatorStyle` on React Native's ScrollView.
527
+ * The default value is `'default'`.
528
+ *
529
+ * Possible values:
530
+ * - `'default'` - Default style (dark on light backgrounds, light on dark backgrounds)
531
+ * - `'black'` - Black scroll indicators
532
+ * - `'white'` - White scroll indicators
533
+ * @platform ios
534
+ */
535
+ indicatorStyle?: IndicatorStyleType;
536
+ /**
537
+ * Function that is invoked when the client needs to download a file.
538
+ *
539
+ * iOS 13+ only: If the webview navigates to a URL that results in an HTTP
540
+ * response with a Content-Disposition header 'attachment...', then
541
+ * this will be called.
542
+ *
543
+ * iOS 8+: If the MIME type indicates that the content is not renderable by the
544
+ * webview, that will also cause this to be called. On iOS versions before 13,
545
+ * this is the only condition that will cause this function to be called.
546
+ *
547
+ * The application will need to provide its own code to actually download
548
+ * the file.
549
+ *
550
+ * If not provided, the default is to let the webview try to render the file.
551
+ */
552
+ onFileDownload?: (event: FileDownloadEvent) => void;
393
553
  /**
394
554
  * A Boolean value which, when set to `true`, indicates to WebKit that a WKWebView
395
555
  * will only navigate to app-bound domains. Once set, any attempt to navigate away
396
- * from an app-bound domain will fail with the error App-bound domain failure.”
556
+ * from an app-bound domain will fail with the error "App-bound domain failure."
397
557
  *
398
- * Applications can specify up to 10 app-bound domains using a new
558
+ * Applications can specify up to 10 "app-bound" domains using a new
399
559
  * Info.plist key `WKAppBoundDomains`.
400
560
  * @platform ios
401
561
  */
@@ -429,22 +589,215 @@ export interface IOSWebViewProps extends WebViewSharedProps {
429
589
  */
430
590
  enableApplePay?: boolean;
431
591
  /**
432
- * An array of objects which will be added to the UIMenu controller when selecting text.
592
+ * An array of objects which will be shown when selecting text. An empty array will suppress the menu.
433
593
  * These will appear after a long press to select text.
434
- * @platform ios
594
+ * @platform ios, android
435
595
  */
436
596
  menuItems?: WebViewCustomMenuItems[];
597
+ /**
598
+ * An array of strings which will be suppressed from the menu.
599
+ * @platform ios
600
+ */
601
+ suppressMenuItems?: SuppressMenuItem[];
437
602
  /**
438
603
  * The function fired when selecting a custom menu item created by `menuItems`.
439
604
  * It passes a WebViewEvent with a `nativeEvent`, where custom keys are passed:
440
605
  * `customMenuKey`: the string of the menu item
441
606
  * `selectedText`: the text selected on the document
607
+ * @platform ios, android
608
+ */
609
+ onCustomMenuSelection?: (event: {
610
+ nativeEvent: {
611
+ label: string;
612
+ key: string;
613
+ selectedText: string;
614
+ };
615
+ }) => void;
616
+ /**
617
+ * A Boolean value that indicates whether the webview shows warnings for suspected
618
+ * fraudulent content, such as malware or phishing attempts.
619
+ * @platform ios
620
+ */
621
+ fraudulentWebsiteWarningEnabled?: boolean;
622
+ /**
623
+ * Exodus: Minimum iOS version required to use the WebView.
624
+ * If the device iOS version is below this, the WebView will not render.
625
+ * Supports complex constraints like "12.5.6 <13, 13.6.1 <14, 14.8.1 <15, 15.7.1"
442
626
  * @platform ios
443
627
  */
444
- onCustomMenuSelection?: (event: WebViewEvent) => void;
628
+ minimumIOSVersion?: string;
629
+ /**
630
+ * Exodus: Component to render if the iOS version is not supported.
631
+ * If not provided, a default error message will be shown.
632
+ * @platform ios
633
+ */
634
+ unsupportedVersionComponent?: ElementType;
635
+ }
636
+ export interface MacOSWebViewProps extends WebViewSharedProps {
637
+ /**
638
+ * Does not store any data within the lifetime of the WebView.
639
+ */
640
+ incognito?: boolean;
641
+ /**
642
+ * Boolean value that determines whether the web view bounces
643
+ * when it reaches the edge of the content. The default value is `true`.
644
+ * @platform macos
645
+ */
646
+ bounces?: boolean;
647
+ /**
648
+ * Boolean value that determines whether scrolling is enabled in the
649
+ * `WebView`. The default value is `true`.
650
+ * @platform macos
651
+ */
652
+ scrollEnabled?: boolean;
653
+ /**
654
+ * If the value of this property is true, the scroll view stops on multiples
655
+ * of the scroll view's bounds when the user scrolls.
656
+ * The default value is false.
657
+ * @platform macos
658
+ */
659
+ pagingEnabled?: boolean;
660
+ /**
661
+ * Controls whether to adjust the content inset for web views that are
662
+ * placed behind a navigation bar, tab bar, or toolbar. The default value
663
+ * is `true`.
664
+ * @platform macos
665
+ */
666
+ automaticallyAdjustContentInsets?: boolean;
667
+ /**
668
+ * This property specifies how the safe area insets are used to modify the
669
+ * content area of the scroll view. The default value of this property is
670
+ * "never". Available on iOS 11 and later.
671
+ */
672
+ contentInsetAdjustmentBehavior?: ContentInsetAdjustmentBehavior;
673
+ /**
674
+ * The amount by which the web view content is inset from the edges of
675
+ * the scroll view. Defaults to {top: 0, left: 0, bottom: 0, right: 0}.
676
+ * @platform macos
677
+ */
678
+ contentInset?: ContentInsetProp;
679
+ /**
680
+ * Boolean that determines whether HTML5 videos play inline or use the
681
+ * native full-screen controller. The default value is `false`.
682
+ *
683
+ * **NOTE** : In order for video to play inline, not only does this
684
+ * property need to be set to `true`, but the video element in the HTML
685
+ * document must also include the `webkit-playsinline` attribute.
686
+ * @platform macos
687
+ */
688
+ allowsInlineMediaPlayback?: boolean;
689
+ /**
690
+ * Boolean value that indicates whether HTML5 videos can play Picture in Picture.
691
+ * The default value is `true`.
692
+ *
693
+ * @platform ios
694
+ */
695
+ allowsPictureInPictureMediaPlayback?: boolean;
696
+ /**
697
+ * A Boolean value indicating whether AirPlay is allowed. The default value is `false`.
698
+ * @platform macos
699
+ */
700
+ allowsAirPlayForMediaPlayback?: boolean;
701
+ /**
702
+ * Hide the accessory view when the keyboard is open. Default is false to be
703
+ * backward compatible.
704
+ */
705
+ hideKeyboardAccessoryView?: boolean;
706
+ /**
707
+ * A Boolean value indicating whether horizontal swipe gestures will trigger
708
+ * back-forward list navigations.
709
+ */
710
+ allowsBackForwardNavigationGestures?: boolean;
711
+ /**
712
+ * A Boolean value indicating whether WebKit WebView should be created using a shared
713
+ * process pool, enabling WebViews to share cookies and localStorage between each other.
714
+ * Default is true but can be set to false for backwards compatibility.
715
+ * @platform macos
716
+ */
717
+ useSharedProcessPool?: boolean;
718
+ /**
719
+ * The custom user agent string.
720
+ */
721
+ userAgent?: string;
722
+ /**
723
+ * A Boolean value that determines whether pressing on a link
724
+ * displays a preview of the destination for the link.
725
+ *
726
+ * This property is available on devices that support Force Touch trackpad.
727
+ * @platform macos
728
+ */
729
+ allowsLinkPreview?: boolean;
730
+ /**
731
+ * Set true if shared cookies from HTTPCookieStorage should used for every load request.
732
+ * The default value is `false`.
733
+ * @platform macos
734
+ */
735
+ sharedCookiesEnabled?: boolean;
736
+ /**
737
+ * A Boolean value that determines whether scrolling is disabled in a particular direction.
738
+ * The default value is `true`.
739
+ * @platform macos
740
+ */
741
+ directionalLockEnabled?: boolean;
742
+ /**
743
+ * A Boolean value indicating whether web content can programmatically display the keyboard.
744
+ *
745
+ * When this property is set to true, the user must explicitly tap the elements in the
746
+ * web view to display the keyboard (or other relevant input view) for that element.
747
+ * When set to false, a focus event on an element causes the input view to be displayed
748
+ * and associated with that element automatically.
749
+ *
750
+ * The default value is `true`.
751
+ * @platform macos
752
+ */
753
+ keyboardDisplayRequiresUserAction?: boolean;
754
+ /**
755
+ * A String value that indicates which URLs the WebView's file can then
756
+ * reference in scripts, AJAX requests, and CSS imports. This is only used
757
+ * for WebViews that are loaded with a source.uri set to a `'file://'` URL.
758
+ *
759
+ * If not provided, the default is to only allow read access to the URL
760
+ * provided in source.uri itself.
761
+ * @platform macos
762
+ */
763
+ allowingReadAccessToURL?: string;
764
+ /**
765
+ * Boolean that sets whether JavaScript running in the context of a file
766
+ * scheme URL should be allowed to access content from other file scheme URLs.
767
+ * Including accessing content from other file scheme URLs
768
+ * @platform macos
769
+ */
770
+ allowFileAccessFromFileURLs?: boolean;
771
+ /**
772
+ * Boolean that sets whether JavaScript running in the context of a file
773
+ * scheme URL should be allowed to access content from any origin.
774
+ * Including accessing content from other file scheme URLs
775
+ * @platform macos
776
+ */
777
+ allowUniversalAccessFromFileURLs?: boolean;
778
+ /**
779
+ * Function that is invoked when the WebKit WebView content process gets terminated.
780
+ * @platform macos
781
+ */
782
+ onContentProcessDidTerminate?: (event: WebViewTerminatedEvent) => void;
445
783
  }
446
784
  export interface AndroidWebViewProps extends WebViewSharedProps {
785
+ onNavigationStateChange?: (event: WebViewNavigation) => void;
447
786
  onContentSizeChange?: (event: WebViewEvent) => void;
787
+ /**
788
+ * Function that is invoked when the `WebView` process crashes or is killed by the OS.
789
+ * Works only on Android (minimum API level 26).
790
+ */
791
+ onRenderProcessGone?: (event: WebViewRenderProcessGoneEvent) => void;
792
+ /**
793
+ * Function that is invoked when the `WebView` should open a new window.
794
+ *
795
+ * This happens when the JS calls `window.open('http://someurl', '_blank')`
796
+ * or when the user clicks on a `<a href="http://someurl" target="_blank">` link.
797
+ *
798
+ * @platform android
799
+ */
800
+ onOpenWindow?: (event: WebViewOpenWindowEvent) => void;
448
801
  /**
449
802
  * https://developer.android.com/reference/android/webkit/WebSettings.html#setCacheMode(int)
450
803
  * Set the cacheMode. Possible values are:
@@ -458,7 +811,7 @@ export interface AndroidWebViewProps extends WebViewSharedProps {
458
811
  */
459
812
  cacheMode?: CacheMode;
460
813
  /**
461
- * https://developer.android.com/reference/android/view/View#OVER_SCROLL_NEVER
814
+ * https://developer.android.com/reference/android/view/View#setOverScrollMode(int)
462
815
  * Sets the overScrollMode. Possible values are:
463
816
  *
464
817
  * - `'always'` (default)
@@ -480,30 +833,35 @@ export interface AndroidWebViewProps extends WebViewSharedProps {
480
833
  */
481
834
  geolocationEnabled?: boolean;
482
835
  /**
483
- * Used on Android only, controls whether form autocomplete data should be saved
836
+ * Boolean that sets whether JavaScript running in the context of a file
837
+ * scheme URL should be allowed to access content from other file scheme URLs.
838
+ * Including accessing content from other file scheme URLs
484
839
  * @platform android
485
840
  */
486
- saveFormDataDisabled?: boolean;
841
+ allowFileAccessFromFileURLs?: boolean;
487
842
  /**
488
- * Boolean value to set whether the WebView supports multiple windows. Used on Android only
489
- * The default value is `true`.
843
+ * Boolean that sets whether JavaScript running in the context of a file
844
+ * scheme URL should be allowed to access content from any origin.
845
+ * Including accessing content from other file scheme URLs
490
846
  * @platform android
491
847
  */
492
- setSupportMultipleWindows?: boolean;
848
+ allowUniversalAccessFromFileURLs?: boolean;
493
849
  /**
494
- * Used on Android only, controls whether the given list of URL prefixes should
495
- * make {@link com.facebook.react.views.webview.ReactWebViewClient} to launch a
496
- * default activity intent for those URL instead of loading it within the webview.
497
- * Use this to list URLs that WebView cannot handle, e.g. a PDF url.
850
+ * Sets whether the webview allow access to file system.
498
851
  * @platform android
499
852
  */
500
- readonly urlPrefixesForDefaultIntent?: string[];
853
+ allowFileAccess?: boolean;
501
854
  /**
502
- * Boolean value to disable Hardware Acceleration in the `WebView`. Used on Android only
503
- * as Hardware Acceleration is a feature only for Android. The default value is `false`.
855
+ * Used on Android only, controls whether form autocomplete data should be saved
504
856
  * @platform android
505
857
  */
506
- androidHardwareAccelerationDisabled?: boolean;
858
+ saveFormDataDisabled?: boolean;
859
+ /**
860
+ * Boolean value to set whether the WebView supports multiple windows. Used on Android only
861
+ * The default value is `true`.
862
+ * @platform android
863
+ */
864
+ setSupportMultipleWindows?: boolean;
507
865
  /**
508
866
  * https://developer.android.com/reference/android/webkit/WebView#setLayerType(int,%20android.graphics.Paint)
509
867
  * Sets the layerType. Possible values are:
@@ -524,7 +882,7 @@ export interface AndroidWebViewProps extends WebViewSharedProps {
524
882
  thirdPartyCookiesEnabled?: boolean;
525
883
  /**
526
884
  * Boolean value to control whether DOM Storage is enabled. Used only in
527
- * Android.
885
+ * Android. The default value is `true`.
528
886
  * @platform android
529
887
  */
530
888
  domStorageEnabled?: boolean;
@@ -549,6 +907,10 @@ export interface AndroidWebViewProps extends WebViewSharedProps {
549
907
  * @platform android
550
908
  */
551
909
  mixedContentMode?: 'never' | 'always' | 'compatibility';
910
+ /**
911
+ * Sets ability to open fullscreen videos on Android devices.
912
+ */
913
+ allowsFullscreenVideo?: boolean;
552
914
  /**
553
915
  * Configuring Dark Theme
554
916
  *
@@ -609,6 +971,13 @@ export interface AndroidWebViewProps extends WebViewSharedProps {
609
971
  * @platform android
610
972
  */
611
973
  allowsProtectedMedia?: boolean;
974
+ /**
975
+ * Function that is invoked when the `WebView` receives an SSL error for a sub-resource.
976
+ *
977
+ * @param event
978
+ * @platform android
979
+ */
980
+ onLoadSubResourceError?: (event: WebViewErrorEvent) => void;
612
981
  }
613
982
  export interface WebViewSharedProps extends ViewProps {
614
983
  /**
@@ -621,6 +990,11 @@ export interface WebViewSharedProps extends ViewProps {
621
990
  * @platform android
622
991
  */
623
992
  javaScriptEnabled?: boolean;
993
+ /**
994
+ * A Boolean value indicating whether JavaScript can open windows without user interaction.
995
+ * The default value is `false`.
996
+ */
997
+ javaScriptCanOpenWindowsAutomatically?: boolean;
624
998
  /**
625
999
  * Stylesheet object to set the style of the container view.
626
1000
  */
@@ -636,7 +1010,7 @@ export interface WebViewSharedProps extends ViewProps {
636
1010
  /**
637
1011
  * Function that is invoked when the `WebView` scrolls.
638
1012
  */
639
- onScroll?: (event: WebViewScrollEvent) => void;
1013
+ onScroll?: ComponentProps<typeof NativeWebViewComponent>['onScroll'];
640
1014
  /**
641
1015
  * Function that is invoked when the `WebView` has finished loading.
642
1016
  */
@@ -653,14 +1027,29 @@ export interface WebViewSharedProps extends ViewProps {
653
1027
  * Function that is invoked when the `WebView` load fails.
654
1028
  */
655
1029
  onError?: (event: WebViewErrorEvent) => void;
1030
+ /**
1031
+ * Function that is invoked when the `WebView` receives an error status code.
1032
+ * Works on iOS and Android (minimum API level 23).
1033
+ */
1034
+ onHttpError?: (event: WebViewHttpErrorEvent) => void;
1035
+ /**
1036
+ * Function that is invoked when the `WebView` loading starts or ends.
1037
+ */
1038
+ onNavigationStateChange?: (event: WebViewNavigation) => void;
656
1039
  /**
657
1040
  * Function that is invoked when the webview calls `window.ReactNativeWebView.postMessage`.
658
1041
  * Setting this property will inject this global into your webview.
659
1042
  *
660
1043
  * `window.ReactNativeWebView.postMessage` accepts one argument, `data`, which will be
661
1044
  * available on the event object, `event.nativeEvent.data`. `data` must be a string.
1045
+ *
1046
+ * Exodus: The callback receives validated/transformed data via validateMeta/validateData.
662
1047
  */
663
1048
  onMessage?: (event: WebViewMessage) => void;
1049
+ /**
1050
+ * Function that is invoked when the `WebView` is loading.
1051
+ */
1052
+ onLoadProgress?: (event: WebViewProgressEvent) => void;
664
1053
  /**
665
1054
  * Boolean value that forces the `WebView` to show the loading view
666
1055
  * on the first load.
@@ -676,6 +1065,16 @@ export interface WebViewSharedProps extends ViewProps {
676
1065
  * once the webview is initialized but before the view loads any content.
677
1066
  */
678
1067
  injectedJavaScriptBeforeContentLoaded?: string;
1068
+ /**
1069
+ * If `true` (default; mandatory for Android), loads the `injectedJavaScript` only into the main frame.
1070
+ * If `false` (only supported on iOS and macOS), loads it into all frames (e.g. iframes).
1071
+ */
1072
+ injectedJavaScriptForMainFrameOnly?: boolean;
1073
+ /**
1074
+ * If `true` (default; mandatory for Android), loads the `injectedJavaScriptBeforeContentLoaded` only into the main frame.
1075
+ * If `false` (only supported on iOS and macOS), loads it into all frames (e.g. iframes).
1076
+ */
1077
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
679
1078
  /**
680
1079
  * Boolean value that determines whether a horizontal scroll indicator is
681
1080
  * shown in the `WebView`. The default value is `true`.
@@ -699,40 +1098,57 @@ export interface WebViewSharedProps extends ViewProps {
699
1098
  * The default whitelisted origins are "http://*" and "https://*".
700
1099
  */
701
1100
  readonly originWhitelist?: string[];
1101
+ /**
1102
+ * Exodus: List of protocol schemes to allow being deep linked to.
1103
+ * This requires an exact match. The default behavior is to only allow "https:".
1104
+ * URLs that don't pass the originWhitelist will be checked against this list
1105
+ * to determine if they should be opened externally via Linking.openURL.
1106
+ */
1107
+ readonly deeplinkWhitelist?: string[];
702
1108
  /**
703
1109
  * Function that allows custom handling of any web view requests. Return
704
1110
  * `true` from the function to continue loading the request and `false`
705
1111
  * to stop loading. The `navigationType` is always `other` on android.
706
1112
  */
707
1113
  onShouldStartLoadWithRequest?: OnShouldStartLoadWithRequest;
1114
+ /**
1115
+ * Override the native component used to render the WebView. Enables a custom native
1116
+ * WebView which uses the same JavaScript as the original WebView.
1117
+ */
1118
+ nativeConfig?: WebViewNativeConfig;
708
1119
  /**
709
1120
  * Should caching be enabled. Default is true.
710
1121
  */
711
1122
  cacheEnabled?: boolean;
1123
+ /**
1124
+ * Append to the existing user-agent. Overridden if `userAgent` is set.
1125
+ */
1126
+ applicationNameForUserAgent?: string;
712
1127
  /**
713
1128
  * An object that specifies the credentials of a user to be used for basic authentication.
714
1129
  */
715
1130
  basicAuthCredential?: BasicAuthCredential;
716
1131
  /**
717
- * Event metadata validation.
1132
+ * Inject a JavaScript object to be accessed as a JSON string via JavaScript in the WebView.
718
1133
  */
719
- validateMeta: (event: WebViewNativeEvent) => WebViewNativeEvent;
1134
+ injectedJavaScriptObject?: object;
720
1135
  /**
721
- * Event data validation.
1136
+ * Enables WebView remote debugging using Chrome (Android) or Safari (iOS).
722
1137
  */
723
- validateData: (data: object) => object;
1138
+ webviewDebuggingEnabled?: boolean;
724
1139
  /**
725
- * Webview will refuse to work on iOS versions below this one. Required for iOS.
1140
+ * Enables support for the Payment Request API for the WebView
726
1141
  */
727
- minimumIOSVersion?: string;
1142
+ paymentRequestEnabled?: boolean;
728
1143
  /**
729
- * Webview will refuse to work on Chrome versions below this one. Required for Android.
1144
+ * Exodus: Event metadata validation.
1145
+ * Function to validate/transform event metadata before it reaches the app.
730
1146
  */
731
- minimumChromeVersion?: string;
1147
+ validateMeta: (event: WebViewNativeEvent) => WebViewNativeEvent;
732
1148
  /**
733
- * Component to render if the OS version is not supported.
1149
+ * Exodus: Event data validation.
1150
+ * Function to validate/transform message data before it reaches the app.
734
1151
  */
735
- unsupportedVersionComponent?: ElementType;
1152
+ validateData: (data: object) => object;
736
1153
  }
737
1154
  export {};
738
- //# sourceMappingURL=WebViewTypes.d.ts.map