2

Is there a flag that is automatically set after window.onload such as window.isLoaded or window.loaded or window.isDOMContentLoaded? (no jQuery)

Ludovic C
  • 2,855
  • 20
  • 40

1 Answers1

4

document.readyState

if (document.readyState === "complete") would be the condition to check.

Found this here: Javascript - How to detect if document has loaded (IE 7/Firefox 3)

Community
  • 1
  • 1
Tony L.
  • 17,638
  • 8
  • 69
  • 66