Module: document-state

Detection of document loading state.

Source:

CSS classes


state-uninitialized
has not started loading yet
state-loading
is loading
state-interactive
Has loaded enough and the user can interact with it
state-complete
fully loaded
state-loaded
when document is loaded (including all images)
state-unloading
when document is unloading

Methods


JS.Responsive.isDocumentLoaded()

Returns if document is in state that everything is loaded.

Since:
  • 3.0.0

Source:
Returns:
Type:
Boolean

JS.Responsive.isDocumentUnloading()

Returns true if user is leaving current page.

Since:
  • 3.0.0

Source:
Returns:
Type:
Boolean

Events


changedDocumentState
{String} - new-state, {String} - old-state, both are states strings like classes but without "state-" prefix