WebView 支持 dom storage (支付宝H5需要)

This commit is contained in:
zu
2021-12-16 15:00:07 +08:00
parent 59790a7093
commit 736853da71

View File

@@ -211,6 +211,7 @@ public class CommonWebViewActivity extends BaseActivity implements ShareDialog.O
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setDomStorageEnabled(true);
// 设置 WebView 可以在 HTTPS 通道上加载 HTTP 资源Android 4.4 后的暗坑
// 因为 Android 4.4 后默认不允许在 HTTPS 通道上加载 HTTP 资源
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {