1

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.

user3871
  • 11,764
  • 27
  • 118
  • 244

0 Answers0