共用方式為


getSession (應用程式設定檔管理員)

傳回工作階段識別碼的工作階段物件。

語法

Microsoft.Apm.getSession(sessionId);

參數

**名字 Type Required 說明
工作階段識別碼 繩子 Yes 工作階段 ID

返回值

Session 作為物件。

Example

const sessionId = "session-id-1";
const session = Microsoft.Apm.getSession(sessionId);
if (!session.isDefault) {
    session.title = "new title";
}