Pure Javascript equivalent to jQuery $(window).load()
The pure Javascript equivalent to
$(window).load(function() {
// Your code goes here!
})
is
window.addEventListener("load", function() {
// Your code goes here!
});
Note that it’s not supported by IE8, but that should not be an issue in 2019.