DOMContentLoaded - DOM Events - W3cubDocs

PHOTO EMBED

Sat Feb 04 2023 17:33:12 GMT+0000 (Coordinated Universal Time)

Saved by @happyisaiah #html

<script>
  document.addEventListener("DOMContentLoaded", function(event) {
    console.log("DOM fully loaded and parsed");
  });

for(var i=0; i<1000000000; i++)
{} // this synchronous script is going to delay parsing of the DOM. So the DOMContentLoaded event is going to launch later.
</script>
content_copyCOPY

https://docs.w3cub.com/dom_events/domcontentloaded