[react_native] JS files from D2017699: Expose JavaScriptEnabled property for WebView component on android.
This commit is contained in:
parent
1f98c843b0
commit
46db1826c5
|
@ -94,6 +94,7 @@ var WebViewExample = React.createClass({
|
|||
automaticallyAdjustContentInsets={false}
|
||||
style={styles.webView}
|
||||
url={this.state.url}
|
||||
javaScriptEnabledAndroid={true}
|
||||
onNavigationStateChange={this.onNavigationStateChange}
|
||||
startInLoadingState={true}
|
||||
/>
|
||||
|
|
|
@ -42,6 +42,7 @@ var WebView = React.createClass({
|
|||
onNavigationStateChange: PropTypes.func,
|
||||
startInLoadingState: PropTypes.bool, // force WebView to show loadingView on first load
|
||||
style: View.propTypes.style,
|
||||
javaScriptEnabledAndroid: PropTypes.bool,
|
||||
/**
|
||||
* Used to locate this view in end-to-end tests.
|
||||
*/
|
||||
|
@ -90,6 +91,7 @@ var WebView = React.createClass({
|
|||
key="webViewKey"
|
||||
style={webViewStyles}
|
||||
url={this.props.url}
|
||||
javaScriptEnabledAndroid={this.props.javaScriptEnabledAndroid}
|
||||
contentInset={this.props.contentInset}
|
||||
automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets}
|
||||
onLoadingStart={this.onLoadingStart}
|
||||
|
@ -157,6 +159,7 @@ var WebView = React.createClass({
|
|||
var RCTWebView = createReactIOSNativeComponentClass({
|
||||
validAttributes: merge(ReactIOSViewAttributes.UIView, {
|
||||
url: true,
|
||||
javaScriptEnabledAndroid: true,
|
||||
}),
|
||||
uiViewClassName: 'RCTWebView',
|
||||
});
|
||||
|
|
|
@ -92,6 +92,10 @@ var WebView = React.createClass({
|
|||
onNavigationStateChange: PropTypes.func,
|
||||
startInLoadingState: PropTypes.bool, // force WebView to show loadingView on first load
|
||||
style: View.propTypes.style,
|
||||
/**
|
||||
* Used for android only, JS is enabled by default for WebView on iOS
|
||||
*/
|
||||
javaScriptEnabledAndroid: PropTypes.bool,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
|
|
Loading…
Reference in New Issue