The Document.readyState property describes the loading state of the document. When the value of this property changes, a Document.readystatechange_event event fires on the document object.
Document.readyState
Document.readystatechange_event
external DocumentReadyState get readyState;