Uday Hiwarale
1 min readJan 22, 2020

--

In any case, wrap your JavaScript code inside ‘DOMContentLoaded’ event. This way, your code will execute when DOM is fully parsed which happens when all external scripts are loaded and executed.

Look for the documentation of ‘DOMContentLoaded’ on the web. It should be documented on MDN.

--

--

Responses (1)