How to use NotificationBox with Thunderbird?

As the title mentions, I’m trying to use NotificationBox with Thunderbird, but there’s extremely limited documentation for it. The only thing I can find was this:

It shows the following:

let notification = notificationbox.appendNotification(
        label: notificationLabel,
        priority: notificationbox.PRIORITY_CRITICAL_HIGH,
        eventCallback: eventCallback,
        notificationIs: customElementClass
notification.messageImage.src = imageUrl;

The issue, is that it does not explain how notificationbox is defined.

See also