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§
- Navigation
Id - Process-unique identity of one accepted top-level navigation attempt.
- Navigation
Progress - 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.
- Observed
WebView State - Fold of
WebViewStateChangeinto the current observed state, including theNone-clears semantics, so all consumers interpret clearing the same way.
Enums§
- Navigation
Cancellation Reason - 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.
- Navigation
Event - Top-level navigation lifecycle. Every
Startedreceives exactly one terminalSucceeded,Failed, orCancelledwith the same id. - Navigation
Outcome - What one navigation event means to a delegate, once stale attempts have been filtered out.
- WebView
Observed Event - A borrowed view of one delivered event, for read-only observers
(automation waits, devtools) that watch a WebView without owning it.
(
WebViewEventis taken by the creation-stage event inwebview.rs.) - WebView
State Change - Observable WebView state snapshots. Not lifecycle transitions:
Locationalone is never evidence of a successful visit, andNoneexplicitly 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§
- WebView
Event Observer - 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.