Name
readyState — NN n/a IE 4 DOM n/a
Synopsis
Read-only
Returns the current download status of the script being loaded from
an external library (.js) file. 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.all.myExternalScript.readyState == "uninitialized") {
statements for alternate handling
}Value
One of the following values (as strings): complete
| interactive | loading |
uninitialized. Some elements may allow the user to
interact with partial content, in which case the property may return
interactive until all loading has completed.
Default
None.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access