Skip to main content

set_tabs_changed_handler

Function set_tabs_changed_handler 

Source
pub fn set_tabs_changed_handler(handler: Arc<dyn Fn() + Send + Sync>)
Expand description

Registers a process-wide observer invoked whenever the browser tab set or tab metadata changes: tab opened/closed, active tab switched, or a tab’s URL/title updated. Intended for shell UIs that mirror the tab list (e.g. sidebar tab rows); the previous handler (if any) is replaced.

The callback may fire from arbitrary runtime threads (webview UI threads included) and must not block; query tabs/current_tab from it to read the new state.