pub enum WebViewEvent {
NavigationStarted {
url: String,
can_cancel: bool,
},
NavigationFinished {
url: String,
success: bool,
},
PageLoadStarted,
PageLoadFinished,
TitleChanged(String),
Message(String),
DownloadStarted {
url: String,
suggested_path: PathBuf,
},
DownloadFinished {
path: PathBuf,
success: bool,
},
ConsoleMessage {
level: ConsoleLevel,
text: String,
},
EngineFocusChanged(bool),
}Expand description
A browser lifecycle / JS→Rust event surfaced by a backend.
Variants§
A navigation is starting. can_cancel is true on backends that
support pre-navigation veto.
A navigation finished (or failed).
PageLoadStarted
The page began loading resources.
PageLoadFinished
The page finished loading.
TitleChanged(String)
The document title changed.
Message(String)
window.ipc.postMessage(payload) fired in the page.
DownloadStarted
A download began.
DownloadFinished
A download finished (or failed).
ConsoleMessage
A console message (forwarded in debug builds / by best-effort backends to report unsupported operations).
EngineFocusChanged(bool)
The engine’s own keyboard focus changed: true when the page took the
keyboard, false when it gave it up.
A web view has two disjoint focus rings — the toolkit’s and the
engine’s platform tree — and the engine’s is the one Teksilo cannot
see. Without this event a tap inside the page moves the OS focus while
Teksilo goes on believing a text field elsewhere still owns it, caret
blinking. The WebView widget follows the event with
EventContext::request_focus on its own frame, so the toolkit’s focus
agrees with the OS.