Default javaScriptEnabled to true
Summary:public Default javaScriptEnabled to true on Android WebView Also remove an old (about 6 weeks old) warning about a back compat supported property Reviewed By: nicklockwood Differential Revision: D2939482 fb-gh-sync-id: 2d476c3365f657da27ea370a033b23154750c2ea shipit-source-id: 2d476c3365f657da27ea370a033b23154750c2ea
This commit is contained in:
Родитель
011dc8904f
Коммит
d0f1466cdd
|
@ -142,6 +142,12 @@ var WebView = React.createClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getDefaultProps: function() {
|
||||||
|
return {
|
||||||
|
javaScriptEnabled : true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
if (this.props.startInLoadingState) {
|
if (this.props.startInLoadingState) {
|
||||||
this.setState({viewState: WebViewState.LOADING});
|
this.setState({viewState: WebViewState.LOADING});
|
||||||
|
@ -170,16 +176,6 @@ var WebView = React.createClass({
|
||||||
webViewStyles.push(styles.hidden);
|
webViewStyles.push(styles.hidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
var {javaScriptEnabled, domStorageEnabled} = this.props;
|
|
||||||
if (this.props.javaScriptEnabledAndroid) {
|
|
||||||
console.warn('javaScriptEnabledAndroid is deprecated. Use javaScriptEnabled instead');
|
|
||||||
javaScriptEnabled = this.props.javaScriptEnabledAndroid;
|
|
||||||
}
|
|
||||||
if (this.props.domStorageEnabledAndroid) {
|
|
||||||
console.warn('domStorageEnabledAndroid is deprecated. Use domStorageEnabled instead');
|
|
||||||
domStorageEnabled = this.props.domStorageEnabledAndroid;
|
|
||||||
}
|
|
||||||
|
|
||||||
var source = this.props.source || {};
|
var source = this.props.source || {};
|
||||||
if (this.props.html) {
|
if (this.props.html) {
|
||||||
source.html = this.props.html;
|
source.html = this.props.html;
|
||||||
|
@ -201,8 +197,8 @@ var WebView = React.createClass({
|
||||||
source={resolveAssetSource(source)}
|
source={resolveAssetSource(source)}
|
||||||
injectedJavaScript={this.props.injectedJavaScript}
|
injectedJavaScript={this.props.injectedJavaScript}
|
||||||
userAgent={this.props.userAgent}
|
userAgent={this.props.userAgent}
|
||||||
javaScriptEnabled={javaScriptEnabled}
|
javaScriptEnabled={this.props.javaScriptEnabled}
|
||||||
domStorageEnabled={domStorageEnabled}
|
domStorageEnabled={this.props.domStorageEnabled}
|
||||||
contentInset={this.props.contentInset}
|
contentInset={this.props.contentInset}
|
||||||
automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets}
|
automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets}
|
||||||
onLoadingStart={this.onLoadingStart}
|
onLoadingStart={this.onLoadingStart}
|
||||||
|
|
|
@ -285,16 +285,6 @@ var WebView = React.createClass({
|
||||||
RCTWebViewManager.startLoadWithResult(!!shouldStart, event.nativeEvent.lockIdentifier);
|
RCTWebViewManager.startLoadWithResult(!!shouldStart, event.nativeEvent.lockIdentifier);
|
||||||
});
|
});
|
||||||
|
|
||||||
var {javaScriptEnabled, domStorageEnabled} = this.props;
|
|
||||||
if (this.props.javaScriptEnabledAndroid) {
|
|
||||||
console.warn('javaScriptEnabledAndroid is deprecated. Use javaScriptEnabled instead');
|
|
||||||
javaScriptEnabled = this.props.javaScriptEnabledAndroid;
|
|
||||||
}
|
|
||||||
if (this.props.domStorageEnabledAndroid) {
|
|
||||||
console.warn('domStorageEnabledAndroid is deprecated. Use domStorageEnabled instead');
|
|
||||||
domStorageEnabled = this.props.domStorageEnabledAndroid;
|
|
||||||
}
|
|
||||||
|
|
||||||
var decelerationRate = processDecelerationRate(this.props.decelerationRate);
|
var decelerationRate = processDecelerationRate(this.props.decelerationRate);
|
||||||
|
|
||||||
var source = this.props.source || {};
|
var source = this.props.source || {};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче