You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Extensions to [`tauri::App`], [`tauri::AppHandle`], [`tauri::WebviewWindow`], [`tauri::Webview`] and [`tauri::Window`] to access the deep-link APIs.
442
450
pubtraitDeepLinkExt<R:Runtime>{
@@ -449,6 +457,54 @@ impl<R: Runtime, T: Manager<R>> crate::DeepLinkExt<R> for T {
449
457
}
450
458
}
451
459
460
+
/// Event that is triggered when the app was requested to open a new URL.
461
+
///
462
+
/// Typed [`tauri::Event`].
463
+
pubstructOpenUrlEvent{
464
+
id:EventId,
465
+
urls:Vec<Url>,
466
+
}
467
+
468
+
implOpenUrlEvent{
469
+
/// The event ID which can be used to stop listening to the event via [`tauri::Listener::unlisten`].
470
+
pubfnid(&self) -> EventId{
471
+
self.id
472
+
}
473
+
474
+
/// The event URLs.
475
+
pubfnurls(self) -> Vec<Url>{
476
+
self.urls
477
+
}
478
+
}
479
+
480
+
impl<R:Runtime>DeepLink<R>{
481
+
/// Handle a new deep link being triggered to open the app.
482
+
///
483
+
/// To avoid race conditions, if the app was started with a deep link,
484
+
/// the closure gets immediately called with the deep link URL.
0 commit comments