Office.InfobarDetails interface
Fournit des détails supplémentaires sur le message de notification qui a déclenché l’événement Office.EventType.InfobarClicked
.
Remarques
[ Ensemble d’API : Boîte aux lettres 1.10 ]
Exemples
/*
* This snippet activates when a notification message is dismissed from an Outlook message or appointment.
* The event handler logs the custom action and notification type to the console.
*/
Office.context.mailbox.item.addHandlerAsync(Office.EventType.InfobarClicked, eventHandler, callback);
function eventHandler(event) {
const infobarDetails = event.infobarDetails;
// Log the custom action type.
console.log(`Custom action type: ${infobarDetails.actionType}`);
// Log the notification type.
switch (infobarDetails.infobarType) {
case Office.MailboxEnums.InfobarType.Error:
console.log("Notification type: Error message");
break;
case Office.MailboxEnums.InfobarType.Informational:
console.log("Notification type: Informational message");
break;
case Office.MailboxEnums.InfobarType.Insight:
console.log("Notification type: Informational message with available actions from the task pane");
break;
case Office.MailboxEnums.InfobarType.ProgressIndicator:
console.log("Notification type: Progress indicator");
break;
}
}
Propriétés
action |
Type d’action. Actuellement, « Ignorer » est la seule action prise en charge. |
infobar |
Le type de notification. |
Détails de la propriété
actionType
Type d’action. Actuellement, « Ignorer » est la seule action prise en charge.
actionType: MailboxEnums.InfobarActionType;
Valeur de propriété
Remarques
infobarType
Le type de notification.
infobarType: MailboxEnums.InfobarType;