mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-25 12:55:41 +08:00
Update with test fixes
This commit is contained in:
@@ -43,6 +43,8 @@ var NavigationType = {
|
||||
other: RCTWebViewManager.NavigationType.Other,
|
||||
};
|
||||
|
||||
var JSNavigationScheme = RCTWebViewManager.JSNavigationScheme;
|
||||
|
||||
type ErrorEvent = {
|
||||
domain: any;
|
||||
code: any;
|
||||
@@ -75,6 +77,7 @@ var defaultRenderError = (errorDomain, errorCode, errorDesc) => (
|
||||
|
||||
var WebView = React.createClass({
|
||||
statics: {
|
||||
JSNavigationScheme: JSNavigationScheme,
|
||||
NavigationType: NavigationType,
|
||||
},
|
||||
|
||||
@@ -86,7 +89,6 @@ var WebView = React.createClass({
|
||||
bounces: PropTypes.bool,
|
||||
scrollEnabled: PropTypes.bool,
|
||||
automaticallyAdjustContentInsets: PropTypes.bool,
|
||||
shouldInjectAJAXHandler: PropTypes.bool,
|
||||
contentInset: EdgeInsetsPropType,
|
||||
onNavigationStateChange: PropTypes.func,
|
||||
startInLoadingState: PropTypes.bool, // force WebView to show loadingView on first load
|
||||
@@ -95,6 +97,11 @@ var WebView = React.createClass({
|
||||
* Used for android only, JS is enabled by default for WebView on iOS
|
||||
*/
|
||||
javaScriptEnabledAndroid: PropTypes.bool,
|
||||
/**
|
||||
* Used for iOS only, sets the JS to be injected when the webpage loads.
|
||||
*/
|
||||
injectedJavascriptIOS: PropTypes.string,
|
||||
|
||||
/**
|
||||
* Used for iOS only, sets whether the webpage scales to fit the view and the
|
||||
* user can change the scale
|
||||
@@ -152,9 +159,9 @@ var WebView = React.createClass({
|
||||
style={webViewStyles}
|
||||
url={this.props.url}
|
||||
html={this.props.html}
|
||||
injectedJavascriptIOS={this.props.injectedJavascriptIOS}
|
||||
bounces={this.props.bounces}
|
||||
scrollEnabled={this.props.scrollEnabled}
|
||||
shouldInjectAJAXHandler={this.props.shouldInjectAJAXHandler}
|
||||
contentInset={this.props.contentInset}
|
||||
automaticallyAdjustContentInsets={this.props.automaticallyAdjustContentInsets}
|
||||
onLoadingStart={this.onLoadingStart}
|
||||
|
||||
Reference in New Issue
Block a user