mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 13:37:09 +00:00
feat(core): add app method on PluginApi (#6705)
This commit is contained in:
parent
06fdcc0edd
commit
34b8f339a4
5
.changes/plugin-api-handle.md
Normal file
5
.changes/plugin-api-handle.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Add `app` method for the `PluginApi` struct.
|
||||
@ -107,6 +107,11 @@ impl<R: Runtime, C: DeserializeOwned> PluginApi<R, C> {
|
||||
pub fn config(&self) -> &C {
|
||||
&self.config
|
||||
}
|
||||
|
||||
/// Returns the application handle.
|
||||
pub fn app(&self) -> &AppHandle<R> {
|
||||
&self.handle
|
||||
}
|
||||
}
|
||||
|
||||
/// Builds a [`TauriPlugin`].
|
||||
|
||||
Loading…
Reference in New Issue
Block a user