-
Notifications
You must be signed in to change notification settings - Fork 246
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
Load scripts synchronously #85
base: master
Are you sure you want to change the base?
Conversation
External scripts were being asynchronously loaded as part of the new page being loaded. This could break inlined scripts that depended on such scripts.
Please merge this, it's very critical. |
External scripts were being asynchronously loaded as part of the new page being loaded. This could break inlined scripts that depended on such scripts. See original dieulot/instantclick#85 for details
@dieulot Why haven't you commented on this yet? You added the "Bug" label 12 days ago, and it seems like you may not have realized that this is a pull request. |
I did notice that, but I haven’t had time to look into it. Don’t fret, I’m just a bit overwhelmed by all there is to do with InstantClick’s development at the moment. |
Alright, no problem. I was just commenting to make sure because it seemed to me like you may not have noticed. I didn't want that to come off in a negative manner. |
👍 |
As a temporary fix to anyone suffering this: load all scripts on all pages (if different Reproduction: <!-- page1.html -->
<script src="fna.js"></script>
<script>fna();</script>
<!-- page2.html -->
<!-- no fna.js -->
<!-- no fna() --> Go to Now, to fix it, do this: <!-- page1.html -->
<script src="fna.js"></script>
<script>fna();</script>
<!-- page2.html -->
<script src="fna.js"></script>
<!-- no fna() --> @dieulot would you consider other maintainers? At least for bugfixing/accepting PR. This project is very cool but it's a pity that it has some unresolved bugs. |
External scripts were being asynchronously loaded as part of the new page being loaded. This could break inlined scripts that depended on such scripts.
Example:
This pull request fixes this problem by waiting for scripts to load before inserting the remaining
script
elements.