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

fix: disable anchor default behavior #1857

Merged
merged 4 commits into from
Oct 24, 2024
Merged

fix: disable anchor default behavior #1857

merged 4 commits into from
Oct 24, 2024

Conversation

xiaoyifang
Copy link
Owner

@xiaoyifang xiaoyifang commented Oct 23, 2024

mostly fix #1379

With this PR ,the following dictionary will continue to load. In the same time ,the script will not work any more during page loading.
Users have to make sure that the script is executed until document ready.

such as (take #1379 for example)

window.load=function(){
document.querySelector("a")?.click()
}

Limitation: only fix the mdx dictionary which is mostly used and most probably customized with js by users.

Another solution is to modify the script and add the defer attribute .
<script src="" defer/>
https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/defer

@xiaoyifang xiaoyifang marked this pull request as draft October 23, 2024 13:47
@xiaoyifang xiaoyifang force-pushed the fix/js-pausing branch 2 times, most recently from 4786ace to b782c5f Compare October 24, 2024 08:20
@xiaoyifang xiaoyifang marked this pull request as ready for review October 24, 2024 12:36
Copy link

@xiaoyifang xiaoyifang merged commit e749a60 into staged Oct 24, 2024
11 of 12 checks passed
@xiaoyifang xiaoyifang deleted the fix/js-pausing branch October 24, 2024 13:06
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.

Playing audio will stop loading page and JS execution
1 participant