readyState
Description
The readyState of Document for JS returns "loading" while the Document is loading, "interactive" once it is finished parsing but still loading subresources, and "complete" once it has loaded.
The readystatechange event fires on the Document object when this value changes.
The DOMContentLoaded event fires after the transition to "interactive" but before the transition to "complete", at the point where all subresources apart from async script elements have loaded.
Syntax
document.readyState
Examples
1 · get
Links
Related
Document
- adoptNode
- body
- characterSet
- close
- compatMode
- contentType
- cookie
- createCDATASection
- createComment
- createDocumentFragment
- createElement
- createElementNS
- createProcessingInstruction
- createTextNode
- currentScript
- defaultView
- designMode
- dir
- doctype
- Document
- documentElement
- documentURI
- domain
- embeds
- exitPictureInPicture
- forms
- getElementsByClassName
- getElementsByName
- getElementsByTagName
- getElementsByTagNameNS
- hasFocus
- head
- hidden
- images
- implementation
- importNode
- lastModified
- links
- location
- onreadystatechange
- onvisibilitychange
- open
- parseHTMLUnsafe
- pictureInPictureEnabled
- plugins
- referrer
- scripts
- title
- URL
- visibilityState
- write
- writeln