You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
483 B
26 lines
483 B
const isAlipay = window.my && navigator.userAgent.indexOf('AlipayClient') > -1
|
|
|
|
export function initWebviewApi (readyCallback) {
|
|
if (!isAlipay) {
|
|
return
|
|
}
|
|
document.addEventListener('DOMContentLoaded', readyCallback)
|
|
const {
|
|
navigateTo,
|
|
navigateBack,
|
|
switchTab,
|
|
reLaunch,
|
|
redirectTo,
|
|
postMessage,
|
|
getEnv
|
|
} = window.my
|
|
return {
|
|
navigateTo,
|
|
navigateBack,
|
|
switchTab,
|
|
reLaunch,
|
|
redirectTo,
|
|
postMessage,
|
|
getEnv
|
|
}
|
|
}
|
|
|