Skip to content
New issue

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

修复 A 标签没有 href 属性时 link 值为 null 语法错,导致部分 A 标签事件不响应 #33

Merged
merged 1 commit into from
Mar 26, 2022

Conversation

csg2008
Copy link
Contributor

@csg2008 csg2008 commented Mar 26, 2022

No description provided.

@xiaoyifang
Copy link
Owner

什么样的事件?

@xiaoyifang xiaoyifang merged commit 82b2fd0 into xiaoyifang:staged Mar 26, 2022
@csg2008
Copy link
Contributor Author

csg2008 commented Mar 26, 2022

目前发现两种情况:
1、类ODE +More example sentences +Synonyms这种将 A 标签当按钮用,切换内容显示与隐藏的
2、类Thesaurus.com这种,给 A 标签加上 data-mp3 data-ogg,用JS检查环境后再用API播放声音的

在开发者工具的第一个标签 Element 下方 Event Listeners 中把 click 事件的 gd-custom.js:4 解除掉,再点 A 标签 console 就不输出JS语法错误,事件也正常响应了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants