We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const globalEvent = weex.requireModule('globalEvent')
export default { onCollectEvent() { return new Promise((resolve) => { globalEvent.addEventListener('collectEvent', event => { console.log('get geolocation', event) resolve() }) }) } }
调用这个方法提示 cannot read property 'addEventListener' of undefined, globalEvent 这个变量是udnefined
The text was updated successfully, but these errors were encountered:
我升级了下sdk,也看一下官方文档
Sorry, something went wrong.
所以现在是可以用了吗?
No branches or pull requests
const globalEvent = weex.requireModule('globalEvent')
export default {
onCollectEvent() {
return new Promise((resolve) => {
globalEvent.addEventListener('collectEvent', event => {
console.log('get geolocation', event)
resolve()
})
})
}
}
调用这个方法提示 cannot read property 'addEventListener' of undefined, globalEvent 这个变量是udnefined
The text was updated successfully, but these errors were encountered: