Renders a native WebView.
Note that WebView is only supported on iOS for now, see https://facebook.github.io/react-native/known-issues.md
Props
Methods
Reference
Props
onShouldStartLoadWithRequest
Allows custom handling of any webview requests by a JS handler. Return true or false from this method to continue loading the request.
automaticallyAdjustContentInsets
contentInset
Type | Required |
object: {top: number, left: number, bottom: number, right: number} | No |
html
injectedJavaScript
Sets the JS to be injected when the webpage loads.
javaScriptEnabledAndroid
Used for android only, JS is enabled by default for WebView on iOS
onNavigationStateChange
bounces
renderError
renderLoading
scalesPageToFit
Used for iOS only, sets whether the webpage scales to fit the view and the user can change the scale
scrollEnabled
startInLoadingState
style
url
Methods
goForward()
goForward();
goBack()
goBack();
reload()
reload();
updateNavigationState()
updateNavigationState((event: Event));
We return an event with a bunch of fields including: url, title, loading, canGoBack, canGoForward
getWebViewHandle()
getWebViewHandle():
onLoadingStart()
onLoadingStart((event: Event));
onLoadingError()
onLoadingError((event: Event));
onLoadingFinish()
onLoadingFinish((event: Event));