hooks
hooks copied to clipboard
taro跨端小程序环境下canUseDom判断依据不足,addEventListener undef
🤔 This is a ...
- [ ] New feature
- [x] Bug fix
- [ ] Site / documentation update
- [ ] Demo update
- [ ] TypeScript definition update
- [ ] Bundle size optimization
- [ ] Performance optimization
- [ ] Enhancement feature
- [ ] Internationalization
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [ ] Other (about what?)
🔗 Related issue link
💡 Background and solution
📝 Changelog
Language | Changelog |
---|---|
🇺🇸 English | |
🇨🇳 Chinese |
☑️ Self Check before Merge
⚠️ Please check all items below before review. ⚠️
- [ ] Doc is updated/provided or not needed
- [ ] Demo is updated/provided or not needed
- [ ] TypeScript definition is updated/provided or not needed
- [ ] Changelog is provided or not needed
taro3.2.15版本 不存在window.addEventListener
window.addEventListener IE9 都支持的东西,taro 3.2.15 不支持,没办法,为特定工具做 polyfill 代价太大。
另外,要支持的话,也不能只是加个检测判空那么简单,还得让功能可用起来,比较麻烦,需要给缺少的 api 都加上可用的 polyfill,所以只能靠工具自己支持了~
目前来看,最新的 taro 已经处理了,PR 关了~