feat(core): add app method on PluginApi (#6705)

This commit is contained in:
Lucas Fernandes Nogueira 2023-04-14 11:33:41 -07:00 committed by GitHub
parent 06fdcc0edd
commit 34b8f339a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": patch
---
Add `app` method for the `PluginApi` struct.

View File

@ -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`].