删除 添加 postMessage 时的 Andorid 版本判断,尝试让一些低版本可以使用,而不是报错 webkit is not defined。

This commit is contained in:
2022-12-29 15:02:59 +08:00
parent df8f636dab
commit a4ca249fd9

View File

@@ -1418,9 +1418,7 @@ public class ThemeableBrowser extends CordovaPlugin {
super.onPageFinished(view, url);
// Set the namespace for postMessage()
if (Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1){
injectDeferredObject("window.webkit={messageHandlers:{cordova_iab:cordova_iab}}", null);
}
injectDeferredObject("window.webkit={messageHandlers:{cordova_iab:cordova_iab}}", null);
// CB-10395 InAppBrowser's WebView not storing cookies reliable to local device storage
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {