指定されたtabIdおよびMSITabIdを使用して、TabContextで通知を閉じます
Typescriptの例を次に示します:
const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID');
const tabContext: ITabContext = await frameworkProvider.getTabContext('browserTabId','msiTabId');
let notificationContext: INotificationContext = await tabContext.getNotificationContext('notificationId007');
const requestObject: IOperationRequest = frameworkProvider.requestHelper.createPublishRequest('CloseNotification') as IOperationRequest;
notificationContext.publish(requestObject).then((message) => {
const response = message as INotificationOperationResponse;
//custom code
});
JavaScriptの例を次に示します:
const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID');
const tabContext = await frameworkProvider.getTabContext('browserTabId','msiTabId');
let notificationContext = await tabContext.getNotificationContext('notificationId007');
const requestObject = frameworkProvider.requestHelper.createPublishRequest('CloseNotification');
notificationContext.publish(requestObject).then((resp) => {
//custom code
}).catch((err) => {
//custom code
});