機械翻訳について

通知終了アイコンなしで通知を表示

通知に「クローズなし」ボタンがない通知を表示する例を次に示します。

Typescriptの例を次に示します:

const frameworkProvider: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID');
    let notificationContext: INotificationContext = await frameworkProvider.getNotificationContext('notificationId007'); 
    const requestObject: IShowNotificationRequest = frameworkProvider.requestHelper.createPublishRequest('ShowNotification') as 		IShowNotificationRequest;         
	requestObject.setTitle('Title');      
	requestObject.setClosable(false);                              
	notificationContext.publish(requestObject).then((message) => {
        const resp = message as INotificationOperationResponse;           
    });
JavaScriptの例を次に示します:
const frameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID'); 
let notificationContext = await frameworkProvider.getNotificationContext('notificationId007'); 
const requestObject = frameworkProvider.requestHelper.createPublishRequest('ShowNotification');  
requestObject.setTitle(fieldName);    
requestObject.setClosable(false);  
notificationContext.publish(requestObject).then((response) => { 
// custom code 
}).catch((err) => { 
console.log(err); 
});