Anytime the script needs the DOM to be completely parsed. For instance if we have added a reference (with the defer keyword) to an external script in the of the HTML document and that script interacts with the DOM in some way, the script would run perfectly fine because it will only be executed once the DOM was loaded completely.