mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-21 01:32:03 +03:00
a093682d2d
* clippy * refactor(core): refactor and fix event system following multiwebview support * update documentation * update js docs * lint * clippy * update multiwindow example [skip ci] * enhance event tests * fix example * Update .changes/tauri-event-after-multiwebview.md Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com> * fix tests * add diagram * Add `App/AppHandle` even target * Discard changes to examples/api/src-tauri/tauri-plugin-sample/permissions/schemas/schema.json * revert accidental changes * regenerate schemas * fix doctests * add helper methods * update docs * update api * update docs [skip ci] * update docs [skip ci] --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Lucas Nogueira <118899497+lucasfernog-crabnebula@users.noreply.github.com>
880 B
880 B
tauri |
---|
patch:breaking |
Refactored the event system to better accommodate the new window types:
- Added
EventTarget
enum. - Added
App/AppHandle::listen
,App/AppHandle::once
andApp/AppHandle::unlisten
to listen to events targetingApp/AppHandle
App/AppHandle/Window/Webview/WebviewWindow::emit
will now emit to all event listeners.App/AppHandle/Window/Webview/WebviewWindow::emit_to
will emit to event targets that match the given label, seeEventTarget
enum.App/AppHandle/Window/Webview/WebviewWindow::emit_filter
will emit to event targets based on a filter callback which now takes&EventTarget
instead of&Window
.- Renamed
Manager::listen_global
andManager::once_global
tolisten_any
andonce_any
respectively to be consistent withEventTarget::Any
, it will now also listen to any event to any target (aka event sniffer).