INNER CODE UNIT · Rust
navigate
versotile-org/verso · verso/src/lib.rs:212
pub fn navigate(&self, url: url::Url) -> Result<(), Box<ipc_channel::ErrorKind>> {
self.sender.send(ToVersoMessage::NavigateTo(url))
}
/// Reload the current webview
pub fn reload(&self) -> Result<(), Box<ipc_channel::ErrorKind>> {
self.sender.send(ToVersoMessage::Reload)
}
/// Listen on navigation starting triggered by user click on a link,
/// return a boolean in the callback to decide whether or not allowing this navigation
pub fn on_navigation_starting(
&self,
callback: impl Fn(url::Url) -> bool + Send + 'static,
) -> Result<(), Box<ipc_channel::ErrorKind>> {
let old_listener = self
.event_listeners
.on_navigation_starting