Name

readyState — NN n/a IE 4 DOM n/a

Synopsis

Read-only

Returns the current download status of the embedded content. This property provides a more granular way of testing whether a particular downloadable element is ready to be run or scripted instead of the onLoad event handler for the entire document. As the value of this property changes during loading, the system fires an onReadyStateChange event.

Example

if (document.contentsMap.readyState == "uninitialized") {
    statements for alternate handling
}

Value

Unlike the document object’s version of this property, the EMBED object’s values are integers. As can best be determined: 0 means uninitialized; 1 means loading; and 4 means complete.

Default

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.