mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-29 04:55:40 +03: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