mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 02:04:55 +00:00
[Android][JS]: supports prop "html" in WebView
This commit is contained in:
parent
b54594e42b
commit
2cbcfcea88
@ -36,7 +36,8 @@ var WebView = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
renderError: PropTypes.func, // view to show if there's an error
|
renderError: PropTypes.func, // view to show if there's an error
|
||||||
renderLoading: PropTypes.func, // loading indicator to show
|
renderLoading: PropTypes.func, // loading indicator to show
|
||||||
url: PropTypes.string.isRequired,
|
url: PropTypes.string,
|
||||||
|
html: PropTypes.string,
|
||||||
automaticallyAdjustContentInsets: PropTypes.bool,
|
automaticallyAdjustContentInsets: PropTypes.bool,
|
||||||
contentInset: EdgeInsetsPropType,
|
contentInset: EdgeInsetsPropType,
|
||||||
onNavigationStateChange: PropTypes.func,
|
onNavigationStateChange: PropTypes.func,
|
||||||
@ -102,6 +103,7 @@ var WebView = React.createClass({
|
|||||||
key="webViewKey"
|
key="webViewKey"
|
||||||
style={webViewStyles}
|
style={webViewStyles}
|
||||||
url={this.props.url}
|
url={this.props.url}
|
||||||
|
html={this.props.html}
|
||||||
injectedJavaScript={this.props.injectedJavaScript}
|
injectedJavaScript={this.props.injectedJavaScript}
|
||||||
userAgent={this.props.userAgent}
|
userAgent={this.props.userAgent}
|
||||||
javaScriptEnabledAndroid={this.props.javaScriptEnabledAndroid}
|
javaScriptEnabledAndroid={this.props.javaScriptEnabledAndroid}
|
||||||
@ -183,6 +185,7 @@ var WebView = React.createClass({
|
|||||||
|
|
||||||
var RCTWebView = createReactNativeComponentClass({
|
var RCTWebView = createReactNativeComponentClass({
|
||||||
validAttributes: merge(ReactNativeViewAttributes.UIView, {
|
validAttributes: merge(ReactNativeViewAttributes.UIView, {
|
||||||
|
html: true,
|
||||||
injectedJavaScript: true,
|
injectedJavaScript: true,
|
||||||
javaScriptEnabledAndroid: true,
|
javaScriptEnabledAndroid: true,
|
||||||
url: true,
|
url: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user