We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vue] 你有使用做过vue与原生app交互吗?说说vue与ap交互的方法
The text was updated successfully, but these errors were encountered:
app定义一个方法传给我们,根据方法调用
Sorry, something went wrong.
jsBridge,建立连接,然后相互调用
用WebViewJavascriptBridge export const connectWebViewJavascriptBridge = callback => { if (window.WebViewJavascriptBridge) { callback(WebViewJavascriptBridge) } else { document.addEventListener( 'WebViewJavascriptBridgeReady', function() { callback(WebViewJavascriptBridge) }, false ) } }
export const connectWebViewJavascriptBridge = callback => { if (window.WebViewJavascriptBridge) { callback(WebViewJavascriptBridge) } else { document.addEventListener( 'WebViewJavascriptBridgeReady', function() { callback(WebViewJavascriptBridge) }, false ) } }
我的做法就是让app在webview把app的方法暴露在window上让前端调用、反之app调用前端的方法也需要前端把方法暴露在window上(window.xxx = 方法或值 ),页面销毁的时候移除方法(delete window.xxx)
cordova
No branches or pull requests
[vue] 你有使用做过vue与原生app交互吗?说说vue与ap交互的方法
The text was updated successfully, but these errors were encountered: