Closed nguyenhuylinhdev closed 2 years ago
I'm experiencing the same issue with the scripts. This pull request works, but the disadvantage is, that each script is loaded sequentially, which makes the page somewhat slower if you have many scripts.
Possible solutions I found:
Hi @prowebat, I found loadJS and and realize that just add async=false, it work like a charm! So I will close this PR and create new PR tomorrow.
nice, that worked. and i also found out that you can just set it in the html with async="" (empty value)
hint for the new PR: "newScript.async = false" should be before line 113 (so attributes can overwrite the default false value).
Yeah, set async="" in html is worked but I have a problem:
I will continue test it.
Hi, this PR add function loadScriptSync to replace function replaceAndRunScript
Because when use replaceAndRunScript, script load not synchronous, so sometime it show error because other script not loaded