From f377d3aa51911f6006dfff35e5aab42c199713cf Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 4 Nov 2015 17:01:23 +0000 Subject: [PATCH] update website --- docs/webview.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/webview.html b/docs/webview.html index 2758c33affd..a20c80f31b1 100644 --- a/docs/webview.html +++ b/docs/webview.html @@ -1,5 +1,6 @@ WebView – React Native | A framework for building native apps using React

WebView

Renders a native WebView.

Note that WebView is only supported on iOS for now, -see https://facebook.github.io/react-native/docs/known-issues.html

Edit on GitHubProps #

automaticallyAdjustContentInsets bool #

bounces bool #

contentInset {top: number, left: number, bottom: number, right: number} #

html string #

injectedJavaScript string #

Sets the JS to be injected when the webpage loads.

javaScriptEnabledAndroid bool #

Used for android only, JS is enabled by default for WebView on iOS

onNavigationStateChange function #

renderError function #

renderLoading function #

scalesPageToFit bool #

Used for iOS only, sets whether the webpage scales to fit the view and the +see https://facebook.github.io/react-native/docs/known-issues.html

Edit on GitHubProps #

automaticallyAdjustContentInsets bool #

bounces bool #

contentInset {top: number, left: number, bottom: number, right: number} #

html string #

injectedJavaScript string #

Sets the JS to be injected when the webpage loads.

javaScriptEnabledAndroid bool #

Used for android only, JS is enabled by default for WebView on iOS

onNavigationStateChange function #

onShouldStartLoadWithRequest function #

Allows custom handling of any webview requests by a JS handler. Return true +or false from this method to continue loading the request.

renderError function #

renderLoading function #

scalesPageToFit bool #

Used for iOS only, sets whether the webpage scales to fit the view and the user can change the scale

scrollEnabled bool #

startInLoadingState bool #

url string #

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); @@ -83,6 +84,7 @@ user can change the scale

={this.state.url} javaScriptEnabledAndroid={true} onNavigationStateChange={this.onNavigationStateChange} + onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest} startInLoadingState={true} scalesPageToFit={this.state.scalesPageToFit} /> @@ -105,6 +107,11 @@ user can change the scale

this.refs[WEBVIEW_REF].reload(); }, + onShouldStartLoadWithRequest: function(event) { + // Implement any custom loading logic here, don't forget to return! + return true; + }, + onNavigationStateChange: function(navState) { this.setState({ backButtonEnabled: navState.canGoBack,