Skip to content

ElectronServiceWorkers

Unofficial

Provides access to the service workers registered within a session.

Import:

import type { ElectronServiceWorkers } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ElectronServiceWorkers

Methods

Method Returns Description
addListener(event, listener) this Registers a listener for the console-message event, emitted when a service worker logs to the console.
addListener(event, listener) this Registers a listener for the registration-completed event, emitted when a service worker has been registered.
getAllRunning() Record<number, ElectronServiceWorkerInfo> Returns all running service workers keyed by version ID.
getFromVersionID(versionId) ElectronServiceWorkerInfo Returns information about the service worker with the given version ID.
on('console-message', listener) this Registers a listener for the console-message event, emitted when a service worker logs to the console.
on('registration-completed', listener) this Registers a listener for the registration-completed event, emitted when a service worker has been registered.
once(event, listener) this Registers a one-time listener for the console-message event.
once(event, listener) this Registers a one-time listener for the registration-completed event.
removeListener(event, listener) this Removes a previously registered console-message event listener.
removeListener(event, listener) this Removes a previously registered registration-completed event listener.

Links to this page: