closeTab (app profile manager)
Closes the specified app tab in the current session.
Note
The anchor tab of a session (the first tab) cannot be closed.
Syntax
Microsoft.Apm.closeTab(tabId);
Parameters
Name | Type | Required | Description |
---|---|---|---|
tabId | String | Yes | Unique identifier of the tab to be closed. |
Return value
None.
Examples
Closing a tab using Microsoft.Apm.closeTab
const tab = Microsoft.Apm.getFocusedSession().getFocusedTab();
if (tab.canClose) {
Microsoft.Apm.closeTab(tab.tabId);
}
Closing a tab using Microsoft.Apm.getFocusedSession().getFocusedTab().close()
const tab = Microsoft.Apm.getFocusedSession().getFocusedTab();
if (tab.canClose) {
tab.close();
}
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea:Enviar y ver comentarios de