[Android][JS]: supports prop "html" in WebView

This commit is contained in:
Hedger Wang 2015-07-10 12:21:19 -07:00
parent b54594e42b
commit 2cbcfcea88
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,8 @@ var WebView = React.createClass({
propTypes: {
renderError: PropTypes.func, // view to show if there's an error
renderLoading: PropTypes.func, // loading indicator to show
url: PropTypes.string.isRequired,
url: PropTypes.string,
html: PropTypes.string,
automaticallyAdjustContentInsets: PropTypes.bool,
contentInset: EdgeInsetsPropType,
onNavigationStateChange: PropTypes.func,
@ -102,6 +103,7 @@ var WebView = React.createClass({
key="webViewKey"
style={webViewStyles}
url={this.props.url}
html={this.props.html}
injectedJavaScript={this.props.injectedJavaScript}
userAgent={this.props.userAgent}
javaScriptEnabledAndroid={this.props.javaScriptEnabledAndroid}
@ -183,6 +185,7 @@ var WebView = React.createClass({
var RCTWebView = createReactNativeComponentClass({
validAttributes: merge(ReactNativeViewAttributes.UIView, {
html: true,
injectedJavaScript: true,
javaScriptEnabledAndroid: true,
url: true,