Skip to content

Commit

Permalink
feat(core): add app method on PluginApi (#6705)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Apr 14, 2023
1 parent 06fdcc0 commit 34b8f33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/plugin-api-handle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Add `app` method for the `PluginApi` struct.
5 changes: 5 additions & 0 deletions core/tauri/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
Expand Down

0 comments on commit 34b8f33

Please sign in to comment.