Share via


WindowTabManager.TabCloseRequested Event

Definition

Occurs when a tab is closed from a system shell surface.

// Register
event_token TabCloseRequested(TypedEventHandler<WindowTabManager, WindowTabCloseRequestedEventArgs const&> const& handler) const;

// Revoke with event_token
void TabCloseRequested(event_token const* cookie) const;

// Revoke with event_revoker
WindowTabManager::TabCloseRequested_revoker TabCloseRequested(auto_revoke_t, TypedEventHandler<WindowTabManager, WindowTabCloseRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<WindowTabManager,WindowTabCloseRequestedEventArgs> TabCloseRequested;
function onTabCloseRequested(eventArgs) { /* Your code */ }
windowTabManager.addEventListener("tabcloserequested", onTabCloseRequested);
windowTabManager.removeEventListener("tabcloserequested", onTabCloseRequested);
- or -
windowTabManager.ontabcloserequested = onTabCloseRequested;
Public Custom Event TabCloseRequested As TypedEventHandler(Of WindowTabManager, WindowTabCloseRequestedEventArgs) 

Event Type

Remarks

Important

This API is for Win32 desktop apps only. UWP and other app types are not supported.

Handle this event to close the tab in your app.

Applies to