You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/start/migrate/from-tauri-1.mdx
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -191,10 +191,12 @@ Most of the environment variables read and written by the Tauri CLI were renamed
191
191
192
192
The event system was redesigned to be easier to use. Instead of relying on the source of the event, it now has a simpler implementation that relies on event targets.
193
193
194
-
- The `emit` function now emits the event to all event listeners
195
-
- Added a new `emit_to` function to trigger an event to a specific target
194
+
- The `emit` function now emits the event to all event listeners.
195
+
- Added a new `emit_to`/`emitTo` function to trigger an event to a specific target.
196
196
-`emit_filter` now filters based on [`EventTarget`](https://docs.rs/tauri/2.0.0/tauri/event/enum.EventTarget.html) instead of a window.
197
197
- Renamed `listen_global` to `listen_any`. It now listens to all events regardless of their filters and targets.
198
+
- JavaScript: `event.listen()` behaves similar to `listen_any`. It now listens to all events regardless of their filters and targets, unless a target is set in the `Options`.
199
+
- JavaScript: `WebviewWindow.listen` etc. only listen to events emitted to the respective `EventTarget`.
0 commit comments