mirror of
https://github.com/status-im/react-native.git
synced 2025-01-30 03:05:44 +00:00
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:
parent
fcc89e9d92
commit
f94abd3c01
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user