javascript on document loaded

document.addEventListener("DOMContentLoaded", function(){
    //....
});

I'm executing an external script, using a <script> inside <head>.

Now since the script executes before the page has loaded, I can't access the <body>, among other things. I'd lik...

BETA Snippet explanation automatically generated by OpenAI:

No explanation generated yet.

Snippet By Tony Lea

·

Created October 8th, 2021

·

Report Snippet