@nextcloud/dialogs
    Preparing search index...

    Interface ServiceWorkerRegistration

    The ServiceWorkerRegistration interface of the Service Worker API represents the service worker registration. Available only in secure contexts.

    MDN Reference

    interface ServiceWorkerRegistration {
        active: ServiceWorker | null;
        cookies: CookieStoreManager;
        installing: ServiceWorker | null;
        navigationPreload: NavigationPreloadManager;
        onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
        pushManager: PushManager;
        scope: string;
        updateViaCache: ServiceWorkerUpdateViaCache;
        waiting: ServiceWorker | null;
        addEventListener<K extends "updatefound">(
            type: K,
            listener: (
                this: ServiceWorkerRegistration,
                ev: ServiceWorkerRegistrationEventMap[K],
            ) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
        removeEventListener<K extends "updatefound">(
            type: K,
            listener: (
                this: ServiceWorkerRegistration,
                ev: ServiceWorkerRegistrationEventMap[K],
            ) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
        showNotification(
            title: string,
            options?: NotificationOptions,
        ): Promise<void>;
        unregister(): Promise<boolean>;
        update(): Promise<ServiceWorkerRegistration>;
    }

    Hierarchy (View Summary)

    Index
    active: ServiceWorker | null

    The active read-only property of the This property is initially set to null.

    MDN Reference

    The cookies read-only property of the ServiceWorkerRegistration interface returns a reference to the CookieStoreManager interface, which enables a web app to subscribe to and unsubscribe from cookie change events in a service worker.

    MDN Reference

    installing: ServiceWorker | null

    The installing read-only property of the initially set to null.

    MDN Reference

    navigationPreload: NavigationPreloadManager

    The navigationPreload read-only property of the ServiceWorkerRegistration interface returns the NavigationPreloadManager associated with the current service worker registration.

    MDN Reference

    onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null
    pushManager: PushManager

    The pushManager read-only property of the support for subscribing, getting an active subscription, and accessing push permission status.

    MDN Reference

    scope: string

    The scope read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control.

    MDN Reference

    The updateViaCache read-only property of the ServiceWorkerRegistration interface returns the value of the setting used to determine the circumstances in which the browser will consult the HTTP cache when it tries to update the service worker or any scripts that are imported via WorkerGlobalScope.importScripts.

    MDN Reference

    waiting: ServiceWorker | null

    The waiting read-only property of the set to null.

    MDN Reference

    • 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

    • The getNotifications() method of the ServiceWorkerRegistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.

      MDN Reference

      Parameters

      Returns Promise<Notification[]>

    • The showNotification() method of the service worker.

      MDN Reference

      Parameters

      Returns Promise<void>

    • The unregister() method of the registration and returns a Promise.

      MDN Reference

      Returns Promise<boolean>