closeTab (gestore profili app)

Chiude la scheda dell'app specificata nella sessione corrente.

Annotazioni

La scheda di ancoraggio di una sessione (la prima scheda) non può essere chiusa.

Sintassi

Microsoft.Apm.closeTab(tabId);

Parametri

Nome TIPO Obbligatorio Description
tabId String Yes Identificatore univoco della scheda da chiudere.

Valore restituito

Nessuno.

Esempi

Chiusura di una scheda utilizzando Microsoft.Apm.closeTab

const tab = Microsoft.Apm.getFocusedSession().getFocusedTab();
if (tab.canClose) {
    Microsoft.Apm.closeTab(tab.tabId);
}

Chiusura di una scheda utilizzando Microsoft.Apm.getFocusedSession().getFocusedTab().close()

const tab = Microsoft.Apm.getFocusedSession().getFocusedTab();
if (tab.canClose) {
    tab.close();
}