Document.readyState (Property)

The current downloading status disposition of the document.


JScript - 3.0
Internet Explorer - 4.0
Property/method value type:String primitive
JavaScript syntax:IEmyDocument.readyState

Sometimes, you can design scripts to execute while the document is downloading. In-line scripts for example. At that time, you may even be able to trigger interval timed deferred executions as well.

If it is important that the document has completed loading, you can check this property for one of the following values:

uninitializedThe object is first instantiated but has not begun loading.
loadingThe object has commenced loading.
loadedThe object has completed loading.
interactiveThe object is loaded but not yet closed but is ready to handle interaction.
completeThe object body has been closed and the loading is finished.

An object may not need to reflect the complete status before you can commence operating on it. Other objects may require that they are completely loaded. For example, you cannot create an OBJECT object that represents an <OBJECT> tag until the <BODY> has completed loading. This is because the ActiveX object construction requires a complete document body structure to attach itself to.

Every time this readyState value changes, it triggers an onReadyStateChange event call-back.

See also:Document object, onReadyStateChange, XML object

Property attributes: