Header menu logo fable-electron-docs-api

ServiceWorkers Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Instance members

Instance member Description

this.getAllRunning ()

Full Usage: this.getAllRunning ()

Returns: Record<float, ServiceWorkerInfo>
Modifiers: inline

A ServiceWorkerInfo object where the keys are the service worker version ID and the values are the information about that service worker.

Returns: Record<float, ServiceWorkerInfo>

this.getInfoFromVersionID versionId

Full Usage: this.getInfoFromVersionID versionId

Parameters:
    versionId : float

Returns: ServiceWorkerInfo
Modifiers: inline

Information about this service workerIf the service worker does not exist or is not running this method will throw an exception.

versionId : float
Returns: ServiceWorkerInfo

this.getWorkerFromVersionID versionId

Full Usage: this.getWorkerFromVersionID versionId

Parameters:
    versionId : float

Returns: Option<ServiceWorkerMain>
Modifiers: inline

Instance of the service worker associated with the given version ID. If there's no associated version, or its running status has changed to 'stopped', this will return undefined.

versionId : float
Returns: Option<ServiceWorkerMain>

this.offConsoleMessage handler

Full Usage: this.offConsoleMessage handler

Parameters:
Modifiers: inline

Emitted when a service worker logs something to the console.

handler : IOnConsoleMessage -> unit

this.offConsoleMessage handler

Full Usage: this.offConsoleMessage handler

Parameters:
Modifiers: inline

Emitted when a service worker logs something to the console.

handler : Event -> MessageDetails -> unit

this.offRegistrationCompleted handler

Full Usage: this.offRegistrationCompleted handler

Parameters:
Modifiers: inline

Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js') successfully resolves or when a Chrome extension is loaded.

handler : IOnRegistrationCompleted -> unit

this.offRegistrationCompleted handler

Full Usage: this.offRegistrationCompleted handler

Parameters:
Modifiers: inline

Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js') successfully resolves or when a Chrome extension is loaded.

handler : Event -> Details -> unit

this.offRunningStatusChanged handler

Full Usage: this.offRunningStatusChanged handler

Parameters:
Modifiers: inline

Emitted when a service worker's running status has changed.

handler : Details -> unit

this.onConsoleMessage handler

Full Usage: this.onConsoleMessage handler

Parameters:
Modifiers: inline

Emitted when a service worker logs something to the console.

handler : IOnConsoleMessage -> unit

this.onConsoleMessage handler

Full Usage: this.onConsoleMessage handler

Parameters:
Modifiers: inline

Emitted when a service worker logs something to the console.

handler : Event -> MessageDetails -> unit

this.onRegistrationCompleted handler

Full Usage: this.onRegistrationCompleted handler

Parameters:
Modifiers: inline

Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js') successfully resolves or when a Chrome extension is loaded.

handler : IOnRegistrationCompleted -> unit

this.onRegistrationCompleted handler

Full Usage: this.onRegistrationCompleted handler

Parameters:
Modifiers: inline

Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js') successfully resolves or when a Chrome extension is loaded.

handler : Event -> Details -> unit

this.onRunningStatusChanged handler

Full Usage: this.onRunningStatusChanged handler

Parameters:
Modifiers: inline

Emitted when a service worker's running status has changed.

handler : Details -> unit

this.onceConsoleMessage handler

Full Usage: this.onceConsoleMessage handler

Parameters:
Modifiers: inline

Emitted when a service worker logs something to the console.

handler : IOnConsoleMessage -> unit

this.onceConsoleMessage handler

Full Usage: this.onceConsoleMessage handler

Parameters:
Modifiers: inline

Emitted when a service worker logs something to the console.

handler : Event -> MessageDetails -> unit

this.onceRegistrationCompleted handler

Full Usage: this.onceRegistrationCompleted handler

Parameters:
Modifiers: inline

Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js') successfully resolves or when a Chrome extension is loaded.

handler : IOnRegistrationCompleted -> unit

this.onceRegistrationCompleted handler

Full Usage: this.onceRegistrationCompleted handler

Parameters:
Modifiers: inline

Emitted when a service worker has been registered. Can occur after a call to navigator.serviceWorker.register('/sw.js') successfully resolves or when a Chrome extension is loaded.

handler : Event -> Details -> unit

this.onceRunningStatusChanged handler

Full Usage: this.onceRunningStatusChanged handler

Parameters:
Modifiers: inline

Emitted when a service worker's running status has changed.

handler : Details -> unit

this.startWorkerForScope scope

Full Usage: this.startWorkerForScope scope

Parameters:
    scope : string

Returns: Promise<ServiceWorkerMain>
Modifiers: inline

Resolves with the service worker when it's started.Starts the service worker or does nothing if already running.

scope : string
Returns: Promise<ServiceWorkerMain>

Type something to start searching.