In browsers that support the event DOMContentLoaded and the property document.readyState:
When
DOMContentLoadedfires, can I assume that the value ofdocument.readyStatewill always be either"complete"or"interactive"/"loaded"?(Or could it be that
document.readyStatesometimes still has the value"loading"?)
In your answer please provide a reference to an authoritative source.
You may wonder: Why not just listen to readystatechange? It is because the Android 2.3.5 standard browser is a target platform, and it does not implement the readystatechange event.
The value of the
readyStateproperty is always"interactive"whenDOMContentLoadedhas fired. This is evidenced by the fact that the MDN documentation claims:is interchangeable with a
DOMContentLoadedhandler. You can also have a look at the spec here, which reiterates this.