@nextcloud/dialogs
    Preparing search index...

    Interface ServiceWorker

    The ServiceWorker interface of the Service Worker API provides a reference to a service worker. Available only in secure contexts.

    MDN Reference

    interface ServiceWorker {
        onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
        onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
        scriptURL: string;
        state: ServiceWorkerState;
        addEventListener<K extends keyof ServiceWorkerEventMap>(
            type: K,
            listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        postMessage(message: any, transfer: Transferable[]): void;
        postMessage(message: any, options?: StructuredSerializeOptions): void;
        removeEventListener<K extends keyof ServiceWorkerEventMap>(
            type: K,
            listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy (View Summary)

    Index
    onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null
    onstatechange: ((this: ServiceWorker, ev: Event) => any) | null
    scriptURL: string

    Returns the ServiceWorker serialized script URL defined as part of ServiceWorkerRegistration.

    MDN Reference

    The state read-only property of the of the service worker.

    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 postMessage() method of the ServiceWorker interface sends a message to the worker.

      MDN Reference

      Parameters

      Returns void

    • Parameters

      Returns void