Skip to content

Commit

Permalink
feat: uni.webview.js 支持 uni x
Browse files Browse the repository at this point in the history
  • Loading branch information
hdx committed Jul 3, 2023
1 parent 310bb49 commit 515f9b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/uni.webview.1.5.5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/platforms/app-plus/runtime/web-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export function initWebviewApi (readyCallback) {
if (!isAppPlus && !isHtml5Plus) {
return
}
if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) { // nvue web-view
if (window.__uniapp_x_postMessage || window.__uniapp_x_) { // uvue web-view
document.addEventListener('DOMContentLoaded', readyCallback)
} else if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) { // nvue web-view
document.addEventListener('DOMContentLoaded', readyCallback)
} else if (window.plus && readyRE.test(document.readyState)) {
setTimeout(readyCallback, 0)
Expand Down

0 comments on commit 515f9b2

Please sign in to comment.