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();
}
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per