What are the differences between the methods document.addEventListener("DOMContentLoaded", function(event) {
and window.onload = function() {
?
They seem to both achieve the same thing by waiting for DOM content to load before doing other stuff.
What are the differences between the methods document.addEventListener("DOMContentLoaded", function(event) {
and window.onload = function() {
?
They seem to both achieve the same thing by waiting for DOM content to load before doing other stuff.