Skip to content
Snippets Groups Projects
user avatar
Benjamin Franzke authored
Improve document-service responsiveness by relying on
`DOMContentLoaded` and `document.readyState` >= `interactive`.

1) Handle non-loading state as "ready" to avoid waiting for `complete`.

   `document.readyState` has three states:

    * `loading`
       The document is still loading.

    * `interactive`
       The document has finished loading and the document
       has been parsed but sub-resources such as scripts, images,
       stylesheets and frames are still loading. The state indicates
       that the DOMContentLoaded event is about to fire.

    * `complete`
       The document and all sub-resources have finished loading.
       The state indicates that the load event is about to fire.

   If DocumentService.ready was called in "interactive" state we have
   been skipping this state as we only considered `complete` to be
   the "ready" state in this case.
   This is wrong as we actually wait for the DOMContentLoaded if we
   are launche...
45d8e094
Name Last commit Last update
..