Table of contents
- 1. Summary
- 2. Syntax
- 3. Example
- 4. See Also
- 5. Specification
Summary
Returns "loading" while the document is loading, and "complete" once it has loaded.
Syntax
var string = document.readyState;
Example
// alternative to DOMContentLoaded
document.onreadystatechange = function () {
if (document.readyState == "complete") {
initApplication();
}
}
See Also
- document.onreadystatechange
- Bug 347174 - Implement document.readystate == "complete"
Mozilla Developer Network