Skip to main content

Module events

Module events 

Source
Expand description

Typed delegate events: correlated navigation lifecycle, observable state snapshots, and the canonical derived-state folds. Typed WebView delegate events: correlated navigation lifecycle, observable state snapshots, and the canonical derived-state folds every consumer must use instead of hand-rolled equivalents.

Structs§

NavigationId
Process-unique identity of one accepted top-level navigation attempt.
NavigationProgress
Attempt bookkeeping every consumer otherwise re-implements: because attempts may overlap (WebView2), a terminal event for an older attempt must not clear loading UI for the newest one.
ObservedWebViewState
Fold of WebViewStateChange into the current observed state, including the None-clears semantics, so all consumers interpret clearing the same way.

Enums§

NavigationCancellationReason
Why an active navigation attempt terminated without success or failure. Cancellation is control flow, not a load error: it must never surface error UI or count as a failed visit.
NavigationEvent
Top-level navigation lifecycle. Every Started receives exactly one terminal Succeeded, Failed, or Cancelled with the same id.
NavigationOutcome
What one navigation event means to a delegate, once stale attempts have been filtered out.
WebViewObservedEvent
A borrowed view of one delivered event, for read-only observers (automation waits, devtools) that watch a WebView without owning it. (WebViewEvent is taken by the creation-stage event in webview.rs.)
WebViewStateChange
Observable WebView state snapshots. Not lifecycle transitions: Location alone is never evidence of a successful visit, and None explicitly clears a previously reported title/favicon (empty strings and empty byte arrays are not sentinels).

Functions§

add_observer
Register a read-only observer for a WebView’s delivered events (automation waits, devtools). Observers run after the delegate, in registration order, on the same delivery drain. Register a read-only observer for webtag’s events.

Type Aliases§

WebViewEventObserver
Read-only event observer. Observers run after the delegate returns, in registration order, on the same delivery drain; they cannot affect delivery and must not block.