pub enum DocumentLoadState {
Commit,
DomContentLoaded,
Load,
NetworkIdle,
}Expand description
Document load states for navigation waiting.
These states are compatible with Playwright’s load states and occur
in the following order: Commit → DomContentLoaded → Load → NetworkIdle
Variants§
Commit
Navigation response received (first byte). This is the earliest state and completes when the server starts sending a response.
DomContentLoaded
DOM fully parsed (DOMContentLoaded event fired).
The HTML document has been completely loaded and parsed.
Load
Full page load complete (load event fired). All resources including images, stylesheets, and scripts have loaded. This is the default wait state.
NetworkIdle
No network requests for 500ms. Useful for pages with dynamic content that loads after the initial page load.
Implementations§
Source§impl DocumentLoadState
impl DocumentLoadState
Sourcepub fn is_reached(&self, current: DocumentLoadState) -> bool
pub fn is_reached(&self, current: DocumentLoadState) -> bool
Check if this state has been reached given the current state.
Returns true if current is at or past self in the load order.
Sourcepub fn cdp_event_name(&self) -> Option<&'static str>
pub fn cdp_event_name(&self) -> Option<&'static str>
Get the CDP event name associated with this state.
Trait Implementations§
Source§impl Clone for DocumentLoadState
impl Clone for DocumentLoadState
Source§fn clone(&self) -> DocumentLoadState
fn clone(&self) -> DocumentLoadState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more