@exodus/react-native-webview 11.26.1-exodus.0 → 11.26.1-exodus.1
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.
- package/apple/RNCWebView.m +1 -1
- package/lib/WebView.android.js +21 -8
- package/lib/WebView.ios.js +26 -12
- package/lib/WebViewTypes.d.ts +3 -23
- package/package.json +1 -1
- package/react-native-webview.podspec +1 -1
package/apple/RNCWebView.m
CHANGED
|
@@ -306,7 +306,7 @@ RCTAutoInsetsProtocol>
|
|
|
306
306
|
{
|
|
307
307
|
WKWebViewConfiguration *wkWebViewConfig = [WKWebViewConfiguration new];
|
|
308
308
|
WKPreferences *prefs = [[WKPreferences alloc]init];
|
|
309
|
-
BOOL _prefsUsed =
|
|
309
|
+
BOOL _prefsUsed = YES;
|
|
310
310
|
if (!_javaScriptEnabled) {
|
|
311
311
|
prefs.javaScriptEnabled = NO;
|
|
312
312
|
_prefsUsed = YES;
|
package/lib/WebView.android.js
CHANGED
|
@@ -20,15 +20,28 @@ import { defaultOriginWhitelist, defaultRenderError, defaultRenderLoading, useWe
|
|
|
20
20
|
import styles from './WebView.styles';
|
|
21
21
|
var codegenNativeCommands = codegenNativeCommandsUntyped;
|
|
22
22
|
var Commands = codegenNativeCommands({
|
|
23
|
-
supportedCommands: ['goBack', 'goForward', 'reload', 'stopLoading', 'injectJavaScript', 'requestFocus', 'postMessage', 'clearFormData', 'clearCache', 'clearHistory', 'loadUrl']
|
|
23
|
+
supportedCommands: ['goBack', 'goForward', 'reload', 'stopLoading', /* 'injectJavaScript', */ 'requestFocus', 'postMessage', 'clearFormData', 'clearCache', 'clearHistory', 'loadUrl']
|
|
24
24
|
});
|
|
25
25
|
var resolveAssetSource = Image.resolveAssetSource;
|
|
26
26
|
/**
|
|
27
27
|
* A simple counter to uniquely identify WebView instances. Do not use this for anything else.
|
|
28
28
|
*/
|
|
29
29
|
var uniqueRef = 0;
|
|
30
|
+
/**
|
|
31
|
+
* Harcoded default for security.
|
|
32
|
+
*/
|
|
33
|
+
var allowFileAccessFromFileURLs = false;
|
|
34
|
+
var allowUniversalAccessFromFileURLs = false;
|
|
35
|
+
var injectedJavaScriptForMainFrameOnly = true;
|
|
36
|
+
var injectedJavaScriptBeforeContentLoadedForMainFrameOnly = true;
|
|
37
|
+
var mediaPlaybackRequiresUserAction = true;
|
|
38
|
+
// Android only
|
|
39
|
+
var allowsFullscreenVideo = false;
|
|
40
|
+
var allowFileAccess = false;
|
|
41
|
+
var setSupportMultipleWindows = true;
|
|
42
|
+
var mixedContentMode = 'never';
|
|
30
43
|
var WebViewComponent = forwardRef(function (_a, ref) {
|
|
31
|
-
var _b = _a.overScrollMode, overScrollMode = _b === void 0 ? 'always' : _b, _c = _a.javaScriptEnabled, javaScriptEnabled = _c === void 0 ? true : _c, _d = _a.thirdPartyCookiesEnabled, thirdPartyCookiesEnabled = _d === void 0 ? true : _d, _e = _a.scalesPageToFit, scalesPageToFit = _e === void 0 ? true : _e, _f = _a.
|
|
44
|
+
var _b = _a.overScrollMode, overScrollMode = _b === void 0 ? 'always' : _b, _c = _a.javaScriptEnabled, javaScriptEnabled = _c === void 0 ? true : _c, _d = _a.thirdPartyCookiesEnabled, thirdPartyCookiesEnabled = _d === void 0 ? true : _d, _e = _a.scalesPageToFit, scalesPageToFit = _e === void 0 ? true : _e, _f = _a.saveFormDataDisabled, saveFormDataDisabled = _f === void 0 ? false : _f, _g = _a.cacheEnabled, cacheEnabled = _g === void 0 ? true : _g, _h = _a.androidHardwareAccelerationDisabled, androidHardwareAccelerationDisabled = _h === void 0 ? false : _h, _j = _a.androidLayerType, androidLayerType = _j === void 0 ? "none" : _j, _k = _a.originWhitelist, originWhitelist = _k === void 0 ? defaultOriginWhitelist : _k, _l = _a.setBuiltInZoomControls, setBuiltInZoomControls = _l === void 0 ? true : _l, _m = _a.setDisplayZoomControls, setDisplayZoomControls = _m === void 0 ? false : _m, _o = _a.nestedScrollEnabled, nestedScrollEnabled = _o === void 0 ? false : _o, startInLoadingState = _a.startInLoadingState, onNavigationStateChange = _a.onNavigationStateChange, onLoadStart = _a.onLoadStart, onError = _a.onError, onLoad = _a.onLoad, onLoadEnd = _a.onLoadEnd, onLoadProgress = _a.onLoadProgress, onHttpErrorProp = _a.onHttpError, onRenderProcessGoneProp = _a.onRenderProcessGone, onMessageProp = _a.onMessage, renderLoading = _a.renderLoading, renderError = _a.renderError, style = _a.style, containerStyle = _a.containerStyle, source = _a.source, onShouldStartLoadWithRequestProp = _a.onShouldStartLoadWithRequest, otherProps = __rest(_a, ["overScrollMode", "javaScriptEnabled", "thirdPartyCookiesEnabled", "scalesPageToFit", "saveFormDataDisabled", "cacheEnabled", "androidHardwareAccelerationDisabled", "androidLayerType", "originWhitelist", "setBuiltInZoomControls", "setDisplayZoomControls", "nestedScrollEnabled", "startInLoadingState", "onNavigationStateChange", "onLoadStart", "onError", "onLoad", "onLoadEnd", "onLoadProgress", "onHttpError", "onRenderProcessGone", "onMessage", "renderLoading", "renderError", "style", "containerStyle", "source", "onShouldStartLoadWithRequest"]);
|
|
32
45
|
var messagingModuleName = useRef("WebViewMessageHandler".concat(uniqueRef += 1)).current;
|
|
33
46
|
var webViewRef = useRef(null);
|
|
34
47
|
var onShouldStartLoadWithRequestCallback = useCallback(function (shouldStart, url, lockIdentifier) {
|
|
@@ -39,7 +52,7 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
39
52
|
Commands.loadUrl(webViewRef.current, url);
|
|
40
53
|
}
|
|
41
54
|
}, []);
|
|
42
|
-
var
|
|
55
|
+
var _p = useWebWiewLogic({
|
|
43
56
|
onNavigationStateChange: onNavigationStateChange,
|
|
44
57
|
onLoad: onLoad,
|
|
45
58
|
onError: onError,
|
|
@@ -53,7 +66,7 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
53
66
|
originWhitelist: originWhitelist,
|
|
54
67
|
onShouldStartLoadWithRequestProp: onShouldStartLoadWithRequestProp,
|
|
55
68
|
onShouldStartLoadWithRequestCallback: onShouldStartLoadWithRequestCallback
|
|
56
|
-
}), onLoadingStart =
|
|
69
|
+
}), onLoadingStart = _p.onLoadingStart, onShouldStartLoadWithRequest = _p.onShouldStartLoadWithRequest, onMessage = _p.onMessage, viewState = _p.viewState, setViewState = _p.setViewState, lastErrorEvent = _p.lastErrorEvent, onHttpError = _p.onHttpError, onLoadingError = _p.onLoadingError, onLoadingFinish = _p.onLoadingFinish, onLoadingProgress = _p.onLoadingProgress, onRenderProcessGone = _p.onRenderProcessGone;
|
|
57
70
|
useImperativeHandle(ref, function () { return ({
|
|
58
71
|
goForward: function () { return Commands.goForward(webViewRef.current); },
|
|
59
72
|
goBack: function () { return Commands.goBack(webViewRef.current); },
|
|
@@ -63,7 +76,7 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
63
76
|
},
|
|
64
77
|
stopLoading: function () { return Commands.stopLoading(webViewRef.current); },
|
|
65
78
|
postMessage: function (data) { return Commands.postMessage(webViewRef.current, data); },
|
|
66
|
-
injectJavaScript:
|
|
79
|
+
// injectJavaScript: (data: string) => Commands.injectJavaScript(webViewRef.current, data),
|
|
67
80
|
requestFocus: function () { return Commands.requestFocus(webViewRef.current); },
|
|
68
81
|
clearFormData: function () { return Commands.clearFormData(webViewRef.current); },
|
|
69
82
|
clearCache: function (includeDiskFiles) { return Commands.clearCache(webViewRef.current, includeDiskFiles); },
|
|
@@ -97,10 +110,10 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
97
110
|
console.warn('WebView: `source.body` is not supported when using GET.');
|
|
98
111
|
}
|
|
99
112
|
}
|
|
100
|
-
var NativeWebView =
|
|
101
|
-
var webView = <NativeWebView key="webViewKey" {...otherProps} messagingEnabled={typeof onMessageProp === 'function'} messagingModuleName={messagingModuleName} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onLoadingStart={onLoadingStart} onHttpError={onHttpError} onRenderProcessGone={onRenderProcessGone} onMessage={onMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} ref={webViewRef}
|
|
113
|
+
var NativeWebView = RNCWebView;
|
|
114
|
+
var webView = <NativeWebView key="webViewKey" {...otherProps} messagingEnabled={typeof onMessageProp === 'function'} messagingModuleName={messagingModuleName} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onLoadingStart={onLoadingStart} onHttpError={onHttpError} onRenderProcessGone={onRenderProcessGone} onMessage={onMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} injectedJavaScriptForMainFrameOnly={injectedJavaScriptForMainFrameOnly} injectedJavaScriptBeforeContentLoadedForMainFrameOnly={injectedJavaScriptBeforeContentLoadedForMainFrameOnly} ref={webViewRef}
|
|
102
115
|
// TODO: find a better way to type this.
|
|
103
|
-
source={resolveAssetSource(source)} style={webViewStyles} overScrollMode={overScrollMode} javaScriptEnabled={javaScriptEnabled} thirdPartyCookiesEnabled={thirdPartyCookiesEnabled} scalesPageToFit={scalesPageToFit} allowsFullscreenVideo={allowsFullscreenVideo} allowFileAccess={allowFileAccess} saveFormDataDisabled={saveFormDataDisabled} cacheEnabled={cacheEnabled} androidHardwareAccelerationDisabled={androidHardwareAccelerationDisabled} androidLayerType={androidLayerType} setSupportMultipleWindows={setSupportMultipleWindows} setBuiltInZoomControls={setBuiltInZoomControls} setDisplayZoomControls={setDisplayZoomControls} nestedScrollEnabled={nestedScrollEnabled} {
|
|
116
|
+
source={resolveAssetSource(source)} style={webViewStyles} overScrollMode={overScrollMode} javaScriptEnabled={javaScriptEnabled} thirdPartyCookiesEnabled={thirdPartyCookiesEnabled} scalesPageToFit={scalesPageToFit} allowsFullscreenVideo={allowsFullscreenVideo} allowFileAccess={allowFileAccess} allowFileAccessFromFileURLs={allowFileAccessFromFileURLs} allowUniversalAccessFromFileURLs={allowUniversalAccessFromFileURLs} saveFormDataDisabled={saveFormDataDisabled} cacheEnabled={cacheEnabled} androidHardwareAccelerationDisabled={androidHardwareAccelerationDisabled} androidLayerType={androidLayerType} setSupportMultipleWindows={setSupportMultipleWindows} setBuiltInZoomControls={setBuiltInZoomControls} setDisplayZoomControls={setDisplayZoomControls} mixedContentMode={mixedContentMode} nestedScrollEnabled={nestedScrollEnabled} mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction}/>;
|
|
104
117
|
return (<View style={webViewContainerStyle}>
|
|
105
118
|
{webView}
|
|
106
119
|
{otherView}
|
package/lib/WebView.ios.js
CHANGED
|
@@ -55,7 +55,7 @@ import { defaultOriginWhitelist, defaultRenderError, defaultRenderLoading, useWe
|
|
|
55
55
|
import styles from './WebView.styles';
|
|
56
56
|
var codegenNativeCommands = codegenNativeCommandsUntyped;
|
|
57
57
|
var Commands = codegenNativeCommands({
|
|
58
|
-
supportedCommands: ['goBack', 'goForward', 'reload', 'stopLoading', 'injectJavaScript', 'requestFocus', 'postMessage', 'loadUrl']
|
|
58
|
+
supportedCommands: ['goBack', 'goForward', 'reload', 'stopLoading', /* 'injectJavaScript', */ 'requestFocus', 'postMessage', 'loadUrl']
|
|
59
59
|
});
|
|
60
60
|
var resolveAssetSource = Image.resolveAssetSource;
|
|
61
61
|
var processDecelerationRate = function (decelerationRate) {
|
|
@@ -76,16 +76,31 @@ var useWarnIfChanges = function (value, name) {
|
|
|
76
76
|
ref.current = value;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* Harcoded defaults for security.
|
|
81
|
+
*/
|
|
82
|
+
var allowFileAccessFromFileURLs = false;
|
|
83
|
+
var allowUniversalAccessFromFileURLs = false;
|
|
84
|
+
var injectedJavaScriptForMainFrameOnly = true;
|
|
85
|
+
var injectedJavaScriptBeforeContentLoadedForMainFrameOnly = true;
|
|
86
|
+
var mediaPlaybackRequiresUserAction = true;
|
|
87
|
+
// iOS only configs
|
|
88
|
+
var allowsInlineMediaPlayback = true;
|
|
89
|
+
var allowsAirPlayForMediaPlayback = false;
|
|
90
|
+
var useSharedProcessPool = false;
|
|
91
|
+
var sharedCookiesEnabled = false;
|
|
92
|
+
var enableApplePay = false;
|
|
93
|
+
var onFileDownload = function () { return console.error('tried to download file'); };
|
|
94
|
+
var dataDetectorTypes = 'none';
|
|
79
95
|
var WebViewComponent = forwardRef(function (_a, ref) {
|
|
80
|
-
var _b = _a.javaScriptEnabled, javaScriptEnabled = _b === void 0 ? true : _b, _c = _a.cacheEnabled, cacheEnabled = _c === void 0 ? true : _c, _d = _a.originWhitelist, originWhitelist = _d === void 0 ? defaultOriginWhitelist : _d, _e = _a.
|
|
96
|
+
var _b = _a.javaScriptEnabled, javaScriptEnabled = _b === void 0 ? true : _b, _c = _a.cacheEnabled, cacheEnabled = _c === void 0 ? true : _c, _d = _a.originWhitelist, originWhitelist = _d === void 0 ? defaultOriginWhitelist : _d, _e = _a.textInteractionEnabled, textInteractionEnabled = _e === void 0 ? true : _e, injectedJavaScript = _a.injectedJavaScript, injectedJavaScriptBeforeContentLoaded = _a.injectedJavaScriptBeforeContentLoaded, startInLoadingState = _a.startInLoadingState, onNavigationStateChange = _a.onNavigationStateChange, onLoadStart = _a.onLoadStart, onError = _a.onError, onLoad = _a.onLoad, onLoadEnd = _a.onLoadEnd, onLoadProgress = _a.onLoadProgress, onContentProcessDidTerminateProp = _a.onContentProcessDidTerminate, onHttpErrorProp = _a.onHttpError, onMessageProp = _a.onMessage, renderLoading = _a.renderLoading, renderError = _a.renderError, style = _a.style, containerStyle = _a.containerStyle, source = _a.source, incognito = _a.incognito, decelerationRateProp = _a.decelerationRate, onShouldStartLoadWithRequestProp = _a.onShouldStartLoadWithRequest, otherProps = __rest(_a, ["javaScriptEnabled", "cacheEnabled", "originWhitelist", "textInteractionEnabled", "injectedJavaScript", "injectedJavaScriptBeforeContentLoaded", "startInLoadingState", "onNavigationStateChange", "onLoadStart", "onError", "onLoad", "onLoadEnd", "onLoadProgress", "onContentProcessDidTerminate", "onHttpError", "onMessage", "renderLoading", "renderError", "style", "containerStyle", "source", "incognito", "decelerationRate", "onShouldStartLoadWithRequest"]);
|
|
81
97
|
var webViewRef = useRef(null);
|
|
82
98
|
var onShouldStartLoadWithRequestCallback = useCallback(function (shouldStart, _url, lockIdentifier) {
|
|
83
99
|
if (lockIdentifier === void 0) { lockIdentifier = 0; }
|
|
84
|
-
var viewManager =
|
|
85
|
-
|| RNCWebViewManager;
|
|
100
|
+
var viewManager = RNCWebViewManager;
|
|
86
101
|
viewManager.startLoadWithResult(!!shouldStart, lockIdentifier);
|
|
87
|
-
}, [
|
|
88
|
-
var
|
|
102
|
+
}, []);
|
|
103
|
+
var _f = useWebWiewLogic({
|
|
89
104
|
onNavigationStateChange: onNavigationStateChange,
|
|
90
105
|
onLoad: onLoad,
|
|
91
106
|
onError: onError,
|
|
@@ -99,7 +114,7 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
99
114
|
onShouldStartLoadWithRequestProp: onShouldStartLoadWithRequestProp,
|
|
100
115
|
onShouldStartLoadWithRequestCallback: onShouldStartLoadWithRequestCallback,
|
|
101
116
|
onContentProcessDidTerminateProp: onContentProcessDidTerminateProp
|
|
102
|
-
}), onLoadingStart =
|
|
117
|
+
}), onLoadingStart = _f.onLoadingStart, onShouldStartLoadWithRequest = _f.onShouldStartLoadWithRequest, onMessage = _f.onMessage, viewState = _f.viewState, setViewState = _f.setViewState, lastErrorEvent = _f.lastErrorEvent, onHttpError = _f.onHttpError, onLoadingError = _f.onLoadingError, onLoadingFinish = _f.onLoadingFinish, onLoadingProgress = _f.onLoadingProgress, onContentProcessDidTerminate = _f.onContentProcessDidTerminate;
|
|
103
118
|
useImperativeHandle(ref, function () { return ({
|
|
104
119
|
goForward: function () { return Commands.goForward(webViewRef.current); },
|
|
105
120
|
goBack: function () { return Commands.goBack(webViewRef.current); },
|
|
@@ -109,7 +124,7 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
109
124
|
},
|
|
110
125
|
stopLoading: function () { return Commands.stopLoading(webViewRef.current); },
|
|
111
126
|
postMessage: function (data) { return Commands.postMessage(webViewRef.current, data); },
|
|
112
|
-
injectJavaScript:
|
|
127
|
+
// injectJavaScript: (data: string) => Commands.injectJavaScript(webViewRef.current, data),
|
|
113
128
|
requestFocus: function () { return Commands.requestFocus(webViewRef.current); }
|
|
114
129
|
}); }, [setViewState, webViewRef]);
|
|
115
130
|
useWarnIfChanges(allowsInlineMediaPlayback, 'allowsInlineMediaPlayback');
|
|
@@ -131,11 +146,10 @@ var WebViewComponent = forwardRef(function (_a, ref) {
|
|
|
131
146
|
var webViewStyles = [styles.container, styles.webView, style];
|
|
132
147
|
var webViewContainerStyle = [styles.container, containerStyle];
|
|
133
148
|
var decelerationRate = processDecelerationRate(decelerationRateProp);
|
|
134
|
-
var NativeWebView =
|
|
135
|
-
|
|
136
|
-
var webView = (<NativeWebView key="webViewKey" {...otherProps} javaScriptEnabled={javaScriptEnabled} cacheEnabled={cacheEnabled} useSharedProcessPool={useSharedProcessPool} textInteractionEnabled={textInteractionEnabled} decelerationRate={decelerationRate} messagingEnabled={typeof onMessageProp === 'function'} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onFileDownload={onFileDownload} onLoadingStart={onLoadingStart} onHttpError={onHttpError} onMessage={onMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} onContentProcessDidTerminate={onContentProcessDidTerminate} injectedJavaScript={injectedJavaScript} injectedJavaScriptBeforeContentLoaded={injectedJavaScriptBeforeContentLoaded} injectedJavaScriptForMainFrameOnly={injectedJavaScriptForMainFrameOnly} injectedJavaScriptBeforeContentLoadedForMainFrameOnly={injectedJavaScriptBeforeContentLoadedForMainFrameOnly} dataDetectorTypes={dataDetectorTypes} allowsAirPlayForMediaPlayback={allowsAirPlayForMediaPlayback} allowsInlineMediaPlayback={allowsInlineMediaPlayback} incognito={incognito} mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction} ref={webViewRef}
|
|
149
|
+
var NativeWebView = RNCWebView;
|
|
150
|
+
var webView = (<NativeWebView key="webViewKey" {...otherProps} allowFileAccessFromFileURLs={allowFileAccessFromFileURLs} allowUniversalAccessFromFileURLs={allowUniversalAccessFromFileURLs} enableApplePay={enableApplePay} javaScriptEnabled={javaScriptEnabled} cacheEnabled={cacheEnabled} dataDetectorTypes={dataDetectorTypes} useSharedProcessPool={useSharedProcessPool} textInteractionEnabled={textInteractionEnabled} decelerationRate={decelerationRate} messagingEnabled={typeof onMessageProp === 'function'} onLoadingError={onLoadingError} onLoadingFinish={onLoadingFinish} onLoadingProgress={onLoadingProgress} onFileDownload={onFileDownload} onLoadingStart={onLoadingStart} onHttpError={onHttpError} onMessage={onMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} onContentProcessDidTerminate={onContentProcessDidTerminate} injectedJavaScript={injectedJavaScript} injectedJavaScriptBeforeContentLoaded={injectedJavaScriptBeforeContentLoaded} injectedJavaScriptForMainFrameOnly={injectedJavaScriptForMainFrameOnly} injectedJavaScriptBeforeContentLoadedForMainFrameOnly={injectedJavaScriptBeforeContentLoadedForMainFrameOnly} allowsAirPlayForMediaPlayback={allowsAirPlayForMediaPlayback} allowsInlineMediaPlayback={allowsInlineMediaPlayback} incognito={incognito} mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction} ref={webViewRef} sharedCookiesEnabled={sharedCookiesEnabled}
|
|
137
151
|
// TODO: find a better way to type this.
|
|
138
|
-
source={resolveAssetSource(source)} style={webViewStyles}
|
|
152
|
+
source={resolveAssetSource(source)} style={webViewStyles}/>);
|
|
139
153
|
return (<View style={webViewContainerStyle}>
|
|
140
154
|
{webView}
|
|
141
155
|
{otherView}
|
package/lib/WebViewTypes.d.ts
CHANGED
|
@@ -143,22 +143,6 @@ export declare type WebViewSource = WebViewSourceUri | WebViewSourceHtml;
|
|
|
143
143
|
export interface ViewManager {
|
|
144
144
|
startLoadWithResult: Function;
|
|
145
145
|
}
|
|
146
|
-
export interface WebViewNativeConfig {
|
|
147
|
-
/**
|
|
148
|
-
* The native component used to render the WebView.
|
|
149
|
-
*/
|
|
150
|
-
component?: typeof NativeWebViewIOS | typeof NativeWebViewAndroid;
|
|
151
|
-
/**
|
|
152
|
-
* Set props directly on the native component WebView. Enables custom props which the
|
|
153
|
-
* original WebView doesn't pass through.
|
|
154
|
-
*/
|
|
155
|
-
props?: Object;
|
|
156
|
-
/**
|
|
157
|
-
* Set the ViewManager to use for communication with the native side.
|
|
158
|
-
* @platform ios, macos
|
|
159
|
-
*/
|
|
160
|
-
viewManager?: ViewManager;
|
|
161
|
-
}
|
|
162
146
|
export declare type OnShouldStartLoadWithRequest = (event: ShouldStartLoadRequest) => boolean;
|
|
163
147
|
export interface BasicAuthCredential {
|
|
164
148
|
/**
|
|
@@ -171,6 +155,7 @@ export interface BasicAuthCredential {
|
|
|
171
155
|
password: string;
|
|
172
156
|
}
|
|
173
157
|
export interface CommonNativeWebViewProps extends ViewProps {
|
|
158
|
+
allowFileAccessFromFileURLs?: boolean;
|
|
174
159
|
cacheEnabled?: boolean;
|
|
175
160
|
incognito?: boolean;
|
|
176
161
|
injectedJavaScript?: string;
|
|
@@ -201,7 +186,6 @@ export interface AndroidNativeWebViewProps extends CommonNativeWebViewProps {
|
|
|
201
186
|
cacheMode?: CacheMode;
|
|
202
187
|
allowFileAccess?: boolean;
|
|
203
188
|
scalesPageToFit?: boolean;
|
|
204
|
-
allowFileAccessFromFileURLs?: boolean;
|
|
205
189
|
allowsFullscreenVideo?: boolean;
|
|
206
190
|
allowUniversalAccessFromFileURLs?: boolean;
|
|
207
191
|
androidHardwareAccelerationDisabled?: boolean;
|
|
@@ -237,7 +221,6 @@ export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
|
|
|
237
221
|
allowsInlineMediaPlayback?: boolean;
|
|
238
222
|
allowsAirPlayForMediaPlayback?: boolean;
|
|
239
223
|
allowsLinkPreview?: boolean;
|
|
240
|
-
allowFileAccessFromFileURLs?: boolean;
|
|
241
224
|
allowUniversalAccessFromFileURLs?: boolean;
|
|
242
225
|
automaticallyAdjustContentInsets?: boolean;
|
|
243
226
|
autoManageStatusBarEnabled?: boolean;
|
|
@@ -258,6 +241,8 @@ export interface IOSNativeWebViewProps extends CommonNativeWebViewProps {
|
|
|
258
241
|
injectedJavaScriptBeforeContentLoadedForMainFrameOnly?: boolean;
|
|
259
242
|
onFileDownload?: (event: FileDownloadEvent) => void;
|
|
260
243
|
limitsNavigationsToAppBoundDomains?: boolean;
|
|
244
|
+
sharedCookiesEnabled?: boolean;
|
|
245
|
+
enableApplePay?: boolean;
|
|
261
246
|
textInteractionEnabled?: boolean;
|
|
262
247
|
mediaCapturePermissionGrantType?: MediaCapturePermissionGrantType;
|
|
263
248
|
}
|
|
@@ -871,11 +856,6 @@ export interface WebViewSharedProps extends ViewProps {
|
|
|
871
856
|
* to stop loading. The `navigationType` is always `other` on android.
|
|
872
857
|
*/
|
|
873
858
|
onShouldStartLoadWithRequest?: OnShouldStartLoadWithRequest;
|
|
874
|
-
/**
|
|
875
|
-
* Override the native component used to render the WebView. Enables a custom native
|
|
876
|
-
* WebView which uses the same JavaScript as the original WebView.
|
|
877
|
-
*/
|
|
878
|
-
nativeConfig?: WebViewNativeConfig;
|
|
879
859
|
/**
|
|
880
860
|
* Should caching be enabled. Default is true.
|
|
881
861
|
*/
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "11.26.1-exodus.
|
|
12
|
+
"version": "11.26.1-exodus.1",
|
|
13
13
|
"homepage": "https://github.com/ExodusMovement/react-native-webview#readme",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"android": "react-native run-android",
|
|
@@ -3,7 +3,7 @@ require 'json'
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name =
|
|
6
|
+
s.name = 'react-native-webview'
|
|
7
7
|
s.version = package['version']
|
|
8
8
|
s.summary = package['description']
|
|
9
9
|
s.license = package['license']
|