用hbuildx开发的微信小程序和h5程序. 小程序需要使用webview嵌入h5页面, 小程序webview怎么发送消息到h5页面(不考虑url传值)?
网上找的uni.createSelectorQuery().in(this).select('.webview').context((res) 拿到的对象是空的,不能调用postMessage方法.
wx.createWebViewContext也提示createWebViewContext方法不存在.
用hbuildx开发的微信小程序和h5程序. 小程序需要使用webview嵌入h5页面, 小程序webview怎么发送消息到h5页面(不考虑url传值)?
网上找的uni.createSelectorQuery().in(this).select('.webview').context((res) 拿到的对象是空的,不能调用postMessage方法.
wx.createWebViewContext也提示createWebViewContext方法不存在.
1 个回复
1***@qq.com
用websocket或者轮训吧