Set WebChromeClient to the android's WebView during instantiation

Summary:Motivation: #6405

Follow up of: #6603

satya164
Closes https://github.com/facebook/react-native/pull/6880

Differential Revision: D3162425

fb-gh-sync-id: 1a91893c66da5550f47e8b801b3bd6079b4f5861
fbshipit-source-id: 1a91893c66da5550f47e8b801b3bd6079b4f5861
This commit is contained in:
Lucas Feliciano 2016-04-11 06:03:27 -07:00 committed by Facebook Github Bot 7
parent fcc89e9d92
commit f94abd3c01
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import android.os.Build;
import android.text.TextUtils;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.webkit.WebChromeClient;
import com.facebook.react.views.webview.events.TopLoadingErrorEvent;
import com.facebook.react.views.webview.events.TopLoadingFinishEvent;
@ -243,6 +244,7 @@ public class ReactWebViewManager extends SimpleViewManager<WebView> {
@Override
protected WebView createViewInstance(ThemedReactContext reactContext) {
ReactWebView webView = new ReactWebView(reactContext);
webView.setWebChromeClient(new WebChromeClient());
reactContext.addLifecycleEventListener(webView);
mWebViewConfig.configWebView(webView);