WebView
Props
renderError
automaticallyAdjustContentInsets
contentInset
html
injectedJavaScript
javaScriptEnabledAndroid
onNavigationStateChange
bounces
renderLoading
scalesPageToFit
scrollEnabled
startInLoadingState
style
url
Methods
goForward
goBack
reload
updateNavigationState
getWebViewHandle
onLoadingStart
onLoadingError
onLoadingFinish
Reference
Props
renderError
Type | Required |
---|---|
function | No |
automaticallyAdjustContentInsets
Type | Required |
---|---|
bool | No |
contentInset
Type | Required |
---|---|
object: {top: number, left: number, bottom: number, right: number} | No |
html
Type | Required |
---|---|
string | No |
injectedJavaScript
Sets the JS to be injected when the webpage loads.
Type | Required |
---|---|
string | No |
javaScriptEnabledAndroid
Used for android only, JS is enabled by default for WebView on iOS
Type | Required |
---|---|
bool | No |
onNavigationStateChange
Type | Required |
---|---|
function | No |
bounces
Type | Required |
---|---|
bool | No |
renderLoading
Type | Required |
---|---|
function | No |
scalesPageToFit
Used for iOS only, sets whether the webpage scales to fit the view and the user can change the scale
Type | Required |
---|---|
bool | No |
scrollEnabled
Type | Required |
---|---|
bool | No |
startInLoadingState
Type | Required |
---|---|
bool | No |
style
Type | Required |
---|---|
View | No |
url
Type | Required |
---|---|
string | No |
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));