DEV Community

Discussion on: Loading scripts on your webpage

Collapse
 
tofl profile image
Tom F.

You wrote that it is done that way in Vanilla JS :

document.addEventListener('DOMContentLoaded', event => {
// the page has finished loading
})

Isn't this plain JS ?

Collapse
 
glennmen profile image
Glenn Carremans

Vanilla JS is plain JS, some more info: stackoverflow.com/a/20435744/7446162

If you enable all the "modules" the download size is still 0 bytes: vanilla-js.com/
Vanilla JS

Collapse
 
jochemstoel profile image
Jochem Stoel

So sweet, I never expected that question.

Collapse
 
tofl profile image
Tom F.

Haha okay I get it.

I guess the joke couldn't have worked on me because I don't use Javascript libraries