diff --git a/Libraries/Components/WebView/WebView.android.js b/Libraries/Components/WebView/WebView.android.js index 2c8e2312d..e9577463f 100644 --- a/Libraries/Components/WebView/WebView.android.js +++ b/Libraries/Components/WebView/WebView.android.js @@ -142,6 +142,12 @@ var WebView = React.createClass({ }; }, + getDefaultProps: function() { + return { + javaScriptEnabled : true, + }; + }, + componentWillMount: function() { if (this.props.startInLoadingState) { this.setState({viewState: WebViewState.LOADING}); @@ -170,16 +176,6 @@ var WebView = React.createClass({ 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 || {}; if (this.props.html) { source.html = this.props.html; @@ -201,8 +197,8 @@ var WebView = React.createClass({ source={resolveAssetSource(source)} injectedJavaScript={this.props.injectedJavaScript} userAgent={this.props.userAgent} - javaScriptEnabled={javaScriptEnabled} - domStorageEnabled={domStorageEnabled} + javaScriptEnabled={this.props.javaScriptEnabled} + domStorageEnabled={this.props.domStorageEnabled} contentInset={this.props.contentInset} automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets} onLoadingStart={this.onLoadingStart} diff --git a/Libraries/Components/WebView/WebView.ios.js b/Libraries/Components/WebView/WebView.ios.js index 3b37331ae..ec6340213 100644 --- a/Libraries/Components/WebView/WebView.ios.js +++ b/Libraries/Components/WebView/WebView.ios.js @@ -285,16 +285,6 @@ var WebView = React.createClass({ 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 source = this.props.source || {};