@exodus/react-native-webview 13.16.0-exodus.3 → 13.16.0-exodus.4

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 (38) hide show
  1. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebChromeClient.java +15 -18
  2. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewClient.java +0 -21
  3. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManagerImpl.kt +5 -50
  4. package/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java +0 -58
  5. package/android/src/oldarch/com/reactnativecommunity/webview/RNCWebViewManager.java +0 -40
  6. package/apple/RNCWebView.mm +0 -8
  7. package/apple/RNCWebViewDecisionManager.m +17 -0
  8. package/apple/RNCWebViewImpl.h +0 -10
  9. package/apple/RNCWebViewImpl.m +24 -72
  10. package/apple/RNCWebViewManager.mm +0 -8
  11. package/lib/RNCWebViewNativeComponent.d.ts +0 -26
  12. package/lib/RNCWebViewNativeComponent.js +1 -1
  13. package/lib/WebView.android.js +1 -1
  14. package/lib/WebView.d.ts +2 -2
  15. package/lib/WebView.ios.js +1 -1
  16. package/lib/WebViewShared.d.ts +5 -5
  17. package/lib/WebViewShared.js +1 -1
  18. package/lib/WebViewTypes.d.ts +5 -358
  19. package/lib/WebViewTypes.js +1 -1
  20. package/package.json +4 -11
  21. package/react-native-webview.podspec +1 -1
  22. package/src/RNCWebViewNativeComponent.ts +0 -37
  23. package/src/WebView.android.tsx +293 -284
  24. package/src/WebView.ios.tsx +223 -256
  25. package/src/WebView.tsx +2 -8
  26. package/src/WebViewShared.tsx +2 -11
  27. package/src/WebViewTypes.ts +2 -396
  28. package/src/__tests__/WebViewShared-test.js +40 -62
  29. package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +0 -1
  30. package/android/src/main/java/com/reactnativecommunity/webview/events/TopHttpErrorEvent.kt +0 -25
  31. package/lib/WebView.windows.d.ts +0 -17
  32. package/lib/WebView.windows.js +0 -1
  33. package/lib/WebViewNativeComponent.windows.d.ts +0 -3
  34. package/lib/WebViewNativeComponent.windows.js +0 -1
  35. package/src/WebView.macos.tsx +0 -252
  36. package/src/WebView.windows.tsx +0 -217
  37. package/src/WebViewNativeComponent.macos.ts +0 -7
  38. package/src/WebViewNativeComponent.windows.ts +0 -8
@@ -31,6 +31,7 @@ import {
31
31
  WebViewSourceUri,
32
32
  } from './WebViewTypes';
33
33
 
34
+ import validateProps from './validation';
34
35
  import styles from './WebView.styles';
35
36
 
36
37
  const { resolveAssetSource } = Image;
@@ -72,276 +73,242 @@ const useWarnIfChanges = <T extends unknown>(value: T, name: string) => {
72
73
  }
73
74
  };
74
75
 
75
- const WebViewComponent = forwardRef<{}, IOSWebViewProps>(
76
- (
77
- {
78
- fraudulentWebsiteWarningEnabled = true,
79
- javaScriptEnabled = true,
80
- cacheEnabled = true,
81
- originWhitelist = defaultOriginWhitelist,
82
- deeplinkWhitelist = defaultDeeplinkWhitelist,
83
- textInteractionEnabled = true,
84
- injectedJavaScript,
85
- injectedJavaScriptBeforeContentLoaded,
86
- injectedJavaScriptForMainFrameOnly = true,
87
- injectedJavaScriptBeforeContentLoadedForMainFrameOnly = true,
88
- injectedJavaScriptObject,
89
- startInLoadingState,
90
- onNavigationStateChange,
91
- onLoadStart,
92
- onError,
93
- onLoad,
94
- onLoadEnd,
95
- onLoadProgress,
96
- onContentProcessDidTerminate: onContentProcessDidTerminateProp,
97
- onFileDownload,
98
- onHttpError: onHttpErrorProp,
99
- onMessage: onMessageProp,
100
- onOpenWindow: onOpenWindowProp,
101
- renderLoading,
102
- renderError,
103
- style,
104
- containerStyle,
105
- source,
106
- nativeConfig,
107
- allowsPictureInPictureMediaPlayback = true,
108
- allowsAirPlayForMediaPlayback,
109
- incognito,
110
- decelerationRate: decelerationRateProp,
111
- onShouldStartLoadWithRequest: onShouldStartLoadWithRequestProp,
112
- validateMeta,
113
- validateData,
114
- minimumIOSVersion,
115
- unsupportedVersionComponent: UnsupportedVersionComponent,
116
- ...otherProps
117
- },
118
- ref
119
- ) => {
120
- const webViewRef = useRef<React.ComponentRef<
121
- HostComponent<NativeProps>
122
- > | null>(null);
76
+ const WebViewComponent = forwardRef<{}, IOSWebViewProps>((props, ref) => {
77
+ // Exodus: Validate props at runtime
78
+ validateProps(props);
123
79
 
124
- const onShouldStartLoadWithRequestCallback = useCallback(
125
- (shouldStart: boolean, _url: string, lockIdentifier = 0) => {
126
- RNCWebViewModule.shouldStartLoadWithLockIdentifier(
127
- shouldStart,
128
- lockIdentifier
129
- );
130
- },
131
- []
132
- );
80
+ const {
81
+ fraudulentWebsiteWarningEnabled = true,
82
+ javaScriptEnabled = true,
83
+ cacheEnabled = true,
84
+ originWhitelist = defaultOriginWhitelist,
85
+ deeplinkWhitelist = defaultDeeplinkWhitelist,
86
+ textInteractionEnabled = true,
87
+ injectedJavaScript,
88
+ injectedJavaScriptBeforeContentLoaded,
89
+ injectedJavaScriptObject,
90
+ startInLoadingState,
91
+ onNavigationStateChange,
92
+ onLoadStart,
93
+ onError,
94
+ onLoad,
95
+ onLoadEnd,
96
+ onLoadProgress,
97
+ onContentProcessDidTerminate: onContentProcessDidTerminateProp,
98
+ onMessage: onMessageProp,
99
+ onOpenWindow: onOpenWindowProp,
100
+ renderLoading,
101
+ renderError,
102
+ style,
103
+ containerStyle,
104
+ source,
105
+ allowsPictureInPictureMediaPlayback = true,
106
+ incognito,
107
+ decelerationRate: decelerationRateProp,
108
+ onShouldStartLoadWithRequest: onShouldStartLoadWithRequestProp,
109
+ validateMeta,
110
+ validateData,
111
+ minimumIOSVersion,
112
+ unsupportedVersionComponent: UnsupportedVersionComponent,
113
+ ...otherProps
114
+ } = props;
133
115
 
134
- const {
135
- onLoadingStart,
136
- onShouldStartLoadWithRequest,
137
- onMessage,
138
- viewState,
139
- setViewState,
140
- lastErrorEvent,
141
- onHttpError,
142
- onLoadingError,
143
- onLoadingFinish,
144
- onLoadingProgress,
145
- onOpenWindow,
146
- onContentProcessDidTerminate,
147
- } = useWebViewLogic({
148
- onNavigationStateChange,
149
- onLoad,
150
- onError,
151
- onHttpErrorProp,
152
- onLoadEnd,
153
- onLoadProgress,
154
- onLoadStart,
155
- onMessageProp,
156
- onOpenWindowProp,
157
- startInLoadingState,
158
- originWhitelist,
159
- deeplinkWhitelist,
160
- onShouldStartLoadWithRequestProp,
161
- onShouldStartLoadWithRequestCallback,
162
- onContentProcessDidTerminateProp,
163
- validateMeta,
164
- validateData,
165
- });
116
+ const webViewRef = useRef<React.ComponentRef<
117
+ HostComponent<NativeProps>
118
+ > | null>(null);
166
119
 
167
- useImperativeHandle(
168
- ref,
169
- () => ({
170
- goForward: () =>
171
- webViewRef.current && Commands.goForward(webViewRef.current),
172
- goBack: () => webViewRef.current && Commands.goBack(webViewRef.current),
173
- reload: () => {
174
- setViewState('LOADING');
175
- if (webViewRef.current) {
176
- Commands.reload(webViewRef.current);
177
- }
178
- },
179
- stopLoading: () =>
180
- webViewRef.current && Commands.stopLoading(webViewRef.current),
181
- postMessage: (data: string) =>
182
- webViewRef.current && Commands.postMessage(webViewRef.current, data),
183
- injectJavaScript: (data: string) =>
184
- webViewRef.current &&
185
- Commands.injectJavaScript(webViewRef.current, data),
186
- requestFocus: () =>
187
- webViewRef.current && Commands.requestFocus(webViewRef.current),
188
- clearCache: (includeDiskFiles: boolean) =>
189
- webViewRef.current &&
190
- Commands.clearCache(webViewRef.current, includeDiskFiles),
191
- }),
192
- [setViewState, webViewRef]
193
- );
120
+ const onShouldStartLoadWithRequestCallback = useCallback(
121
+ (shouldStart: boolean, _url: string, lockIdentifier = 0) => {
122
+ RNCWebViewModule.shouldStartLoadWithLockIdentifier(
123
+ shouldStart,
124
+ lockIdentifier
125
+ );
126
+ },
127
+ []
128
+ );
194
129
 
195
- useWarnIfChanges(
196
- securityAllowsInlineMediaPlayback,
197
- 'allowsInlineMediaPlayback'
198
- );
199
- useWarnIfChanges(
200
- allowsPictureInPictureMediaPlayback,
201
- 'allowsPictureInPictureMediaPlayback'
202
- );
203
- useWarnIfChanges(
204
- allowsAirPlayForMediaPlayback,
205
- 'allowsAirPlayForMediaPlayback'
206
- );
207
- useWarnIfChanges(incognito, 'incognito');
208
- useWarnIfChanges(
209
- securityMediaPlaybackRequiresUserAction,
210
- 'mediaPlaybackRequiresUserAction'
211
- );
212
- useWarnIfChanges(securityDataDetectorTypes, 'dataDetectorTypes');
130
+ const {
131
+ onLoadingStart,
132
+ onShouldStartLoadWithRequest,
133
+ onMessage,
134
+ viewState,
135
+ setViewState,
136
+ lastErrorEvent,
137
+ onLoadingError,
138
+ onLoadingFinish,
139
+ onLoadingProgress,
140
+ onOpenWindow,
141
+ onContentProcessDidTerminate,
142
+ } = useWebViewLogic({
143
+ onNavigationStateChange,
144
+ onLoad,
145
+ onError,
146
+ onLoadEnd,
147
+ onLoadProgress,
148
+ onLoadStart,
149
+ onMessageProp,
150
+ onOpenWindowProp,
151
+ startInLoadingState,
152
+ originWhitelist,
153
+ deeplinkWhitelist,
154
+ onShouldStartLoadWithRequestProp,
155
+ onShouldStartLoadWithRequestCallback,
156
+ onContentProcessDidTerminateProp,
157
+ validateMeta,
158
+ validateData,
159
+ });
213
160
 
214
- // Exodus: Check iOS version against minimum requirements
215
- const iosVersion = String(Platform.Version);
216
- const passesMinimum = minimumIOSVersion
217
- ? versionPasses(iosVersion, minimumIOSVersion)
218
- : true;
219
- const passesHardMinimum = versionPasses(iosVersion, hardMinimumIOSVersion);
161
+ useImperativeHandle(
162
+ ref,
163
+ () => ({
164
+ goForward: () =>
165
+ webViewRef.current && Commands.goForward(webViewRef.current),
166
+ goBack: () => webViewRef.current && Commands.goBack(webViewRef.current),
167
+ reload: () => {
168
+ setViewState('LOADING');
169
+ if (webViewRef.current) {
170
+ Commands.reload(webViewRef.current);
171
+ }
172
+ },
173
+ stopLoading: () =>
174
+ webViewRef.current && Commands.stopLoading(webViewRef.current),
175
+ postMessage: (data: string) =>
176
+ webViewRef.current && Commands.postMessage(webViewRef.current, data),
177
+ requestFocus: () =>
178
+ webViewRef.current && Commands.requestFocus(webViewRef.current),
179
+ clearCache: (includeDiskFiles: boolean) =>
180
+ webViewRef.current &&
181
+ Commands.clearCache(webViewRef.current, includeDiskFiles),
182
+ }),
183
+ [setViewState, webViewRef]
184
+ );
220
185
 
221
- if (!passesMinimum || !passesHardMinimum) {
222
- if (UnsupportedVersionComponent) {
223
- return <UnsupportedVersionComponent />;
224
- }
225
- return (
226
- <View style={{ alignSelf: 'flex-start' }}>
227
- <Text style={{ color: 'red' }}>
228
- iOS version is outdated and insecure. Update it to continue.
229
- </Text>
230
- </View>
231
- );
232
- }
186
+ useWarnIfChanges(
187
+ securityAllowsInlineMediaPlayback,
188
+ 'allowsInlineMediaPlayback'
189
+ );
190
+ useWarnIfChanges(
191
+ allowsPictureInPictureMediaPlayback,
192
+ 'allowsPictureInPictureMediaPlayback'
193
+ );
194
+ useWarnIfChanges(incognito, 'incognito');
195
+ useWarnIfChanges(
196
+ securityMediaPlaybackRequiresUserAction,
197
+ 'mediaPlaybackRequiresUserAction'
198
+ );
199
+ useWarnIfChanges(securityDataDetectorTypes, 'dataDetectorTypes');
233
200
 
234
- let otherView = null;
235
- if (viewState === 'LOADING') {
236
- otherView = (renderLoading || defaultRenderLoading)();
237
- } else if (viewState === 'ERROR') {
238
- invariant(
239
- lastErrorEvent != null,
240
- 'lastErrorEvent expected to be non-null'
241
- );
242
- otherView = (renderError || defaultRenderError)(
243
- lastErrorEvent?.domain,
244
- lastErrorEvent?.code ?? 0,
245
- lastErrorEvent?.description ?? ''
246
- );
247
- } else if (viewState !== 'IDLE') {
248
- console.error(`RNCWebView invalid state encountered: ${viewState}`);
201
+ // Exodus: Check iOS version against minimum requirements
202
+ const iosVersion = String(Platform.Version);
203
+ const passesMinimum = minimumIOSVersion
204
+ ? versionPasses(iosVersion, minimumIOSVersion)
205
+ : true;
206
+ const passesHardMinimum = versionPasses(iosVersion, hardMinimumIOSVersion);
207
+
208
+ if (!passesMinimum || !passesHardMinimum) {
209
+ if (UnsupportedVersionComponent) {
210
+ return <UnsupportedVersionComponent />;
249
211
  }
212
+ return (
213
+ <View style={{ alignSelf: 'flex-start' }}>
214
+ <Text style={{ color: 'red' }}>
215
+ iOS version is outdated and insecure. Update it to continue.
216
+ </Text>
217
+ </View>
218
+ );
219
+ }
250
220
 
251
- const webViewStyles = [styles.container, styles.webView, style];
252
- const webViewContainerStyle = [styles.container, containerStyle];
221
+ let otherView = null;
222
+ if (viewState === 'LOADING') {
223
+ otherView = (renderLoading || defaultRenderLoading)();
224
+ } else if (viewState === 'ERROR') {
225
+ invariant(lastErrorEvent != null, 'lastErrorEvent expected to be non-null');
226
+ otherView = (renderError || defaultRenderError)(
227
+ lastErrorEvent?.domain,
228
+ lastErrorEvent?.code ?? 0,
229
+ lastErrorEvent?.description ?? ''
230
+ );
231
+ } else if (viewState !== 'IDLE') {
232
+ console.error(`RNCWebView invalid state encountered: ${viewState}`);
233
+ }
253
234
 
254
- const decelerationRate = processDecelerationRate(decelerationRateProp);
235
+ const webViewStyles = [styles.container, styles.webView, style];
236
+ const webViewContainerStyle = [styles.container, containerStyle];
255
237
 
256
- const NativeWebView =
257
- (nativeConfig?.component as typeof RNCWebView | undefined) || RNCWebView;
238
+ const decelerationRate = processDecelerationRate(decelerationRateProp);
258
239
 
259
- const sourceResolved = resolveAssetSource(source as ImageSourcePropType);
260
- const newSource =
261
- typeof sourceResolved === 'object'
262
- ? Object.entries(sourceResolved as WebViewSourceUri).reduce(
263
- (prev, [currKey, currValue]) => {
264
- return {
265
- ...prev,
266
- [currKey]:
267
- currKey === 'headers' &&
268
- currValue &&
269
- typeof currValue === 'object'
270
- ? Object.entries(currValue).map(([key, value]) => {
271
- return {
272
- name: key,
273
- value,
274
- };
275
- })
276
- : currValue,
277
- };
278
- },
279
- {}
280
- )
281
- : sourceResolved;
240
+ const sourceResolved = resolveAssetSource(source as ImageSourcePropType);
241
+ const newSource =
242
+ typeof sourceResolved === 'object'
243
+ ? Object.entries(sourceResolved as WebViewSourceUri).reduce(
244
+ (prev, [currKey, currValue]) => {
245
+ return {
246
+ ...prev,
247
+ [currKey]:
248
+ currKey === 'headers' &&
249
+ currValue &&
250
+ typeof currValue === 'object'
251
+ ? Object.entries(currValue).map(([key, value]) => {
252
+ return {
253
+ name: key,
254
+ value,
255
+ };
256
+ })
257
+ : currValue,
258
+ };
259
+ },
260
+ {}
261
+ )
262
+ : sourceResolved;
282
263
 
283
- const webView = (
284
- <NativeWebView
285
- key="webViewKey"
286
- {...otherProps}
287
- fraudulentWebsiteWarningEnabled={fraudulentWebsiteWarningEnabled}
288
- javaScriptEnabled={javaScriptEnabled}
289
- cacheEnabled={cacheEnabled}
290
- useSharedProcessPool={securityUseSharedProcessPool}
291
- sharedCookiesEnabled={securitySharedCookiesEnabled}
292
- enableApplePay={securityEnableApplePay}
293
- textInteractionEnabled={textInteractionEnabled}
294
- decelerationRate={decelerationRate}
295
- messagingEnabled={typeof onMessageProp === 'function'}
296
- messagingModuleName="" // android ONLY
297
- onLoadingError={onLoadingError}
298
- onLoadingFinish={onLoadingFinish}
299
- onLoadingProgress={onLoadingProgress}
300
- onFileDownload={onFileDownload}
301
- onLoadingStart={onLoadingStart}
302
- onHttpError={onHttpError}
303
- onMessage={onMessage}
304
- onOpenWindow={onOpenWindowProp && onOpenWindow}
305
- hasOnOpenWindowEvent={onOpenWindowProp !== undefined}
306
- onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
307
- onContentProcessDidTerminate={onContentProcessDidTerminate}
308
- injectedJavaScript={injectedJavaScript}
309
- injectedJavaScriptBeforeContentLoaded={
310
- injectedJavaScriptBeforeContentLoaded
311
- }
312
- injectedJavaScriptForMainFrameOnly={injectedJavaScriptForMainFrameOnly}
313
- injectedJavaScriptBeforeContentLoadedForMainFrameOnly={
314
- injectedJavaScriptBeforeContentLoadedForMainFrameOnly
315
- }
316
- injectedJavaScriptObject={JSON.stringify(injectedJavaScriptObject)}
317
- dataDetectorTypes={securityDataDetectorTypes}
318
- allowsAirPlayForMediaPlayback={allowsAirPlayForMediaPlayback}
319
- allowsInlineMediaPlayback={securityAllowsInlineMediaPlayback}
320
- allowsPictureInPictureMediaPlayback={
321
- allowsPictureInPictureMediaPlayback
322
- }
323
- incognito={incognito}
324
- mediaPlaybackRequiresUserAction={
325
- securityMediaPlaybackRequiresUserAction
326
- }
327
- newSource={newSource}
328
- style={webViewStyles}
329
- hasOnFileDownload={!!onFileDownload}
330
- ref={webViewRef}
331
- // @ts-expect-error source prop for old arch compatibility
332
- source={sourceResolved}
333
- {...nativeConfig?.props}
334
- />
335
- );
264
+ const webView = (
265
+ <RNCWebView
266
+ key="webViewKey"
267
+ {...otherProps}
268
+ fraudulentWebsiteWarningEnabled={fraudulentWebsiteWarningEnabled}
269
+ javaScriptEnabled={javaScriptEnabled}
270
+ cacheEnabled={cacheEnabled}
271
+ useSharedProcessPool={securityUseSharedProcessPool}
272
+ sharedCookiesEnabled={securitySharedCookiesEnabled}
273
+ enableApplePay={securityEnableApplePay}
274
+ textInteractionEnabled={textInteractionEnabled}
275
+ decelerationRate={decelerationRate}
276
+ messagingEnabled={typeof onMessageProp === 'function'}
277
+ messagingModuleName="" // android ONLY
278
+ onLoadingError={onLoadingError}
279
+ onLoadingFinish={onLoadingFinish}
280
+ onLoadingProgress={onLoadingProgress}
281
+ onLoadingStart={onLoadingStart}
282
+ onMessage={onMessage}
283
+ onOpenWindow={onOpenWindowProp && onOpenWindow}
284
+ hasOnOpenWindowEvent={onOpenWindowProp !== undefined}
285
+ onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
286
+ onContentProcessDidTerminate={onContentProcessDidTerminate}
287
+ injectedJavaScript={injectedJavaScript}
288
+ injectedJavaScriptBeforeContentLoaded={
289
+ injectedJavaScriptBeforeContentLoaded
290
+ }
291
+ injectedJavaScriptObject={JSON.stringify(injectedJavaScriptObject)}
292
+ dataDetectorTypes={securityDataDetectorTypes}
293
+ allowsInlineMediaPlayback={securityAllowsInlineMediaPlayback}
294
+ allowsPictureInPictureMediaPlayback={allowsPictureInPictureMediaPlayback}
295
+ incognito={incognito}
296
+ mediaPlaybackRequiresUserAction={securityMediaPlaybackRequiresUserAction}
297
+ newSource={newSource}
298
+ style={webViewStyles}
299
+ ref={webViewRef}
300
+ // @ts-expect-error source prop for old arch compatibility
301
+ source={sourceResolved}
302
+ />
303
+ );
336
304
 
337
- return (
338
- <View style={webViewContainerStyle}>
339
- {webView}
340
- {otherView}
341
- </View>
342
- );
343
- }
344
- );
305
+ return (
306
+ <View style={webViewContainerStyle}>
307
+ {webView}
308
+ {otherView}
309
+ </View>
310
+ );
311
+ });
345
312
 
346
313
  // no native implementation for iOS, depends only on permissions
347
314
  const isFileUploadSupported: () => Promise<boolean> = async () => true;
package/src/WebView.tsx CHANGED
@@ -1,15 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Text, View } from 'react-native';
3
- import {
4
- IOSWebViewProps,
5
- AndroidWebViewProps,
6
- WindowsWebViewProps,
7
- } from './WebViewTypes';
3
+ import { IOSWebViewProps, AndroidWebViewProps } from './WebViewTypes';
8
4
  import styles from './WebView.styles';
9
5
 
10
- export type WebViewProps = IOSWebViewProps &
11
- AndroidWebViewProps &
12
- WindowsWebViewProps;
6
+ export type WebViewProps = IOSWebViewProps & AndroidWebViewProps;
13
7
 
14
8
  // This "dummy" WebView is to render something for unsupported platforms,
15
9
  // like for example Expo SDK "web" platform.
@@ -6,7 +6,6 @@ import {
6
6
  ShouldStartLoadRequestEvent,
7
7
  WebViewError,
8
8
  WebViewErrorEvent,
9
- WebViewHttpErrorEvent,
10
9
  WebViewMessage,
11
10
  WebViewMessageEvent,
12
11
  WebViewNavigation,
@@ -181,6 +180,8 @@ export {
181
180
  createOnShouldStartLoadWithRequest,
182
181
  defaultRenderLoading,
183
182
  defaultRenderError,
183
+ passesWhitelist,
184
+ compileWhitelist,
184
185
  };
185
186
 
186
187
  export const useWebViewLogic = ({
@@ -192,7 +193,6 @@ export const useWebViewLogic = ({
192
193
  onLoadEnd,
193
194
  onError,
194
195
  onLoadSubResourceError,
195
- onHttpErrorProp,
196
196
  onMessageProp,
197
197
  onOpenWindowProp,
198
198
  onRenderProcessGoneProp,
@@ -212,7 +212,6 @@ export const useWebViewLogic = ({
212
212
  onLoadEnd?: (event: WebViewNavigationEvent | WebViewErrorEvent) => void;
213
213
  onError?: (event: WebViewErrorEvent) => void;
214
214
  onLoadSubResourceError?: (event: WebViewErrorEvent) => void;
215
- onHttpErrorProp?: (event: WebViewHttpErrorEvent) => void;
216
215
  onMessageProp?: (event: WebViewMessage) => void;
217
216
  onOpenWindowProp?: (event: WebViewOpenWindowEvent) => void;
218
217
  onRenderProcessGoneProp?: (event: WebViewRenderProcessGoneEvent) => void;
@@ -301,13 +300,6 @@ export const useWebViewLogic = ({
301
300
  [onLoadSubResourceError]
302
301
  );
303
302
 
304
- const onHttpError = useCallback(
305
- (event: WebViewHttpErrorEvent) => {
306
- onHttpErrorProp?.(event);
307
- },
308
- [onHttpErrorProp]
309
- );
310
-
311
303
  // Android Only
312
304
  const onRenderProcessGone = useCallback(
313
305
  (event: WebViewRenderProcessGoneEvent) => {
@@ -409,7 +401,6 @@ export const useWebViewLogic = ({
409
401
  onLoadingError,
410
402
  onLoadingSubResourceError,
411
403
  onLoadingFinish,
412
- onHttpError,
413
404
  onRenderProcessGone,
414
405
  onContentProcessDidTerminate,
415
406
  onMessage,