mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
feat(core): expose runtime_handle on AppHandle (#6727)
This commit is contained in:
committed by
GitHub
parent
e6e586ad75
commit
276e4a3fdb
5
.changes/app-runtime-handle.md
Normal file
5
.changes/app-runtime-handle.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Added the `runtime_handle` method on `AppHandle`.
|
||||
5
.changes/expose-runtime.md
Normal file
5
.changes/expose-runtime.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Re-export the `tauri_runtime` crate as `tauri::runtime`.
|
||||
@@ -277,6 +277,11 @@ impl<R: Runtime> AppHandle<R> {
|
||||
pub(crate) fn create_proxy(&self) -> R::EventLoopProxy {
|
||||
self.runtime_handle.create_proxy()
|
||||
}
|
||||
|
||||
/// Returns the handle to the application runtime.
|
||||
pub fn runtime_handle(&self) -> &R::Handle {
|
||||
&self.runtime_handle
|
||||
}
|
||||
}
|
||||
|
||||
/// APIs specific to the wry runtime.
|
||||
|
||||
@@ -199,7 +199,7 @@ mod manager;
|
||||
mod pattern;
|
||||
pub mod plugin;
|
||||
pub mod window;
|
||||
use tauri_runtime as runtime;
|
||||
pub use tauri_runtime as runtime;
|
||||
#[cfg(target_os = "ios")]
|
||||
mod ios;
|
||||
#[cfg(target_os = "android")]
|
||||
|
||||
Reference in New Issue
Block a user