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
  • 12,432
  • 33
  • 128
  • 268

0 Answers0