document.readyState

Table of contents

  1. 1. Summary
  2. 2. Syntax
  3. 3. Example
  4. 4. See Also
  5. 5. Specification
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Example
  4. 4. See Also
  5. 5. Specification

« Gecko DOM Reference

Introduced in Gecko 1.9.2

(Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

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

Tags (5)

Edit tags

Attachments (0)

 

Attach file