Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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();
}