更换贺报下载的方法25

This commit is contained in:
xuxingjun
2024-12-30 16:18:44 +08:00
parent a3a1b50e1a
commit e82d9823be
2 changed files with 21 additions and 56 deletions

View File

@@ -187,13 +187,14 @@ function appCallBack() {}
return window.WVJBCallbacks.push(callback)
}
window.WVJBCallbacks = [callback]
var WVJBIframe = document.createElement('iframe')
var WVJBIframe = {}
WVJBIframe = document.createElement('iframe')
WVJBIframe.style.display = 'none'
WVJBIframe.src = 'https://__bridge_loaded__'
document.documentElement.appendChild(WVJBIframe)
setTimeout(function() {
// setTimeout(function() {
document.documentElement.removeChild(WVJBIframe)
}, 1000)
// }, 100)
}
}
@@ -243,11 +244,10 @@ function appCallBack() {}
return triggerCallHandler(method, params)
}
})
console.log('z合理',window.WebViewJavascriptBridge);
window.WebViewJavascriptBridge = null
})(window)
//notation: js file can only use this kind of comments
//since comments will cause error when use in webview.loadurl,
//comments will be remove by java use regexp
setTimeout(function() {
document.documentElement.removeChild(WVJBIframe)
}, 4000)