Defines specific states of page loading. Useful for synchronizing actions with the page’s readiness, such as waiting for the DOM to be fully parsed or for all resources to be loaded.

Definition

enum LoadState {
  DOM_CONTENT_LOADED
  LOAD
  NETWORK_IDLE
}

Values

DOM_CONTENT_LOADED

The `DOMContentLoaded` event has been fired. The HTML is parsed, but external resources like images and stylesheets may still be loading.

LOAD

The `load` event has been fired. The page and all its dependent resources are fully loaded.

NETWORK_IDLE

The network is idle, meaning there are no more than 0-2 active network connections for at least 500ms. This indicates that most dynamic content loading has completed.