Office.InfobarClickedEventArgs interface

Provides basic details about the notification message that raised the Office.EventType.InfobarClicked event.

Remarks

[ API set: Mailbox 1.10 ]

Examples

// Adds an event handler for the InfobarClicked event.
Office.onReady(() => {
    document.addEventListener('DOMContentLoaded', () => {
        // Get a reference to the mailbox and use it to add an event handler.
        const mailbox = Office.context.mailbox;
        mailbox.addHandlerAsync(Office.EventType.InfobarClicked, infobarClickedHandler, (result) => {
            if (result.status === Office.AsyncResultStatus.Failed) {
                console.error(`Failed to add event handler: ${asyncResult.error.message}`);
                return;
            }

            console.log("Event handler added successfully.");
        });
    });
});

// Handles the InfobarClicked event.
function infobarClickedHandler(event) {
    console.log(`Event: ${event.type}`);
    const infobarDetails = event.infobarDetails;
    console.log(`Notification type: ${infobarDetails.infobarType}`);
    console.log(`Action type: ${infobarDetails.actionType}`);
}

Properties

infobarDetails

Gets additional details about the notification message.

type

Gets the type of the event. For details, refer to Office.EventType.

Property Details

infobarDetails

Gets additional details about the notification message.

infobarDetails: InfobarDetails;

Property Value

Remarks

[ API set: Mailbox 1.10 ]

type

Gets the type of the event. For details, refer to Office.EventType.

type: "olkInfobarClicked";

Property Value

"olkInfobarClicked"

Remarks

[ API set: Mailbox 1.10 ]