The Document.readyState property describes the loading state of the document.
Document.readyState
MDN Reference