document.onreadystatechange

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 2.0

(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Summary

the readystatechange event is fired when document.readyState is changed.

Syntax

document.onreadystatechange = funcRef;

funcRef is a function reference, called when the event is fired.

Example

// alternative to DOMContentLoaded
document.onreadystatechange = function () {
    if (document.readyState == "complete") {
        initApplication();
    }
}

See Also

Tags (4)

Edit tags

Attachments (0)

 

Attach file