WindowTabManager.TabCloseRequested 事件

定义

从系统外壳图面关闭选项卡时发生。

// 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) 

事件类型

注解

重要

此 API 仅适用于 Win32 桌面应用。 不支持 UWP 和其他应用类型。

处理此事件以关闭应用中的选项卡。

适用于