Waiting for dynamically loaded script

Add an ID to your script file so you can query it. <script id=”hljs” async src=”https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/highlight.min.js”></script> Then add a load listener to it in JavaScript <script> var script = document.querySelector(‘#hljs’); script.addEventListener(‘load’, function() { hljs.initHighlightingOnLoad(); }); </script>

load and execute order of scripts

If you aren’t dynamically loading scripts or marking them as defer or async, then scripts are loaded in the order encountered in the page. It doesn’t matter whether it’s an external script or an inline script – they are executed in the order they are encountered in the page. Inline scripts that come after external … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)