Comparing version 1.0.8 to 1.0.10
12
m.js
@@ -36,9 +36,11 @@ let initFlag = false; // 初始化完成标记 | ||
function jsBridgeReady(callback) { | ||
// 如果 jsbridge 已经注入则直接调用 | ||
if (window.AlipayJSBridge) { | ||
callback && callback(); | ||
} else { | ||
// #ifdef H5 | ||
if (typeof AlipayJSBridge === 'undefined' && typeof document !== 'undefined') { | ||
// 如果没有注入则监听注入的事件 | ||
document.addEventListener('AlipayJSBridgeReady', callback, false); | ||
return document.addEventListener('AlipayJSBridgeReady', callback, false); | ||
} | ||
// 如果 jsbridge 已经注入则直接调用 | ||
callback && callback(); | ||
// #endif | ||
} | ||
@@ -45,0 +47,0 @@ |
{ | ||
"name": "a-tracker", | ||
"version": "1.0.8", | ||
"version": "1.0.10", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/joenix/a-tracker.git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26257
360