File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 13
13
## About
14
14
15
15
Interact with a Tauri backend using the pure Rust library.
16
- You don't need NPM or any other JavaScript ecosystem tools to build the frontend, use Cargo instead.
16
+ You don't need NPM or any other JavaScript tools to build a frontend, use Cargo instead.
17
17
18
18
This crate is designed for Tauri version 2.0 and above.
19
19
Original file line number Diff line number Diff line change @@ -68,6 +68,24 @@ pub(crate) mod api {
68
68
///
69
69
/// To trigger an event to a listener registered by a specific target
70
70
/// you can use the [`to`](Emit::to) function.
71
+ ///
72
+ /// # Capabilities
73
+ ///
74
+ /// Note that in order to emit events, the Tauri framework
75
+ /// requires the corresponding capabilities to be enabled.
76
+ /// For example, let's say our application and its window
77
+ /// are named "app". Then your `Tauri.toml` config should
78
+ /// include something like:
79
+ ///
80
+ /// ```toml
81
+ /// [app]
82
+ /// # app configs..
83
+ ///
84
+ /// [[app.security.capabilities]]
85
+ /// identifier = "default"
86
+ /// windows = ["app"]
87
+ /// permissions = ["core:event:default"]
88
+ /// ```
71
89
#[ inline]
72
90
pub fn emit < E , P > ( event : E , payload : & P ) -> Result < Emit < E :: Js > , Error >
73
91
where
You can’t perform that action at this time.
0 commit comments