@nextcloud/dialogs
    Preparing search index...

    Interface Notification

    The Notification interface of the Notifications API is used to configure and display desktop notifications to the user.

    MDN Reference

    interface Notification {
        badge: string;
        body: string;
        data: any;
        dir: NotificationDirection;
        icon: string;
        lang: string;
        onclick: ((this: Notification, ev: Event) => any) | null;
        onclose: ((this: Notification, ev: Event) => any) | null;
        onerror: ((this: Notification, ev: Event) => any) | null;
        onshow: ((this: Notification, ev: Event) => any) | null;
        requireInteraction: boolean;
        silent: boolean | null;
        tag: string;
        title: string;
        addEventListener<K extends keyof NotificationEventMap>(
            type: K,
            listener: (this: Notification, ev: NotificationEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        close(): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener<K extends keyof NotificationEventMap>(
            type: K,
            listener: (this: Notification, ev: NotificationEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy (View Summary)

    Index
    badge: string

    The badge read-only property of the Notification interface returns a string containing the URL of an image to represent the notification when there is not enough space to display the notification itself such as for example, the Android Notification Bar.

    MDN Reference

    body: string

    The body read-only property of the specified in the body option of the A string.

    MDN Reference

    data: any

    The data read-only property of the data, as specified in the data option of the The notification's data can be any arbitrary data that you want associated with the notification.

    MDN Reference

    The dir read-only property of the Notification interface indicates the text direction of the notification, as specified in the dir option of the Notification.Notification constructor.

    MDN Reference

    icon: string

    The icon read-only property of the part of the notification, as specified in the icon option of the A string.

    MDN Reference

    lang: string

    The lang read-only property of the as specified in the lang option of the The language itself is specified using a string representing a language tag according to MISSING: RFC(5646, 'Tags for Identifying Languages (also known as BCP 47)')].

    MDN Reference

    onclick: ((this: Notification, ev: Event) => any) | null
    onclose: ((this: Notification, ev: Event) => any) | null
    onerror: ((this: Notification, ev: Event) => any) | null
    onshow: ((this: Notification, ev: Event) => any) | null
    requireInteraction: boolean

    The requireInteraction read-only property of the Notification interface returns a boolean value indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.

    MDN Reference

    silent: boolean | null

    The silent read-only property of the silent, i.e., no sounds or vibrations should be issued regardless of the device settings.

    MDN Reference

    tag: string

    The tag read-only property of the as specified in the tag option of the The idea of notification tags is that more than one notification can share the same tag, linking them together.

    MDN Reference

    title: string

    The title read-only property of the specified in the title parameter of the A string.

    MDN Reference

    • The close() method of the Notification interface is used to close/remove a previously displayed notification.

      MDN Reference

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      Returns boolean