import ServiceWorker from 'chrome-remote-interface-extra/lib/workers/ServiceWorker.js'
ServiceWorker
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(manager: WorkerManager) |
Member Summary
Private Members | ||
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
|
|
public |
async deliverPushMessage(data: string): Promise<void> Delivers a push message to the supplied origin from the ServiceWorker |
|
public |
async dispatchSyncEvent(tag: string, lastChance: boolean): Promise<void> |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
async skipWaiting(): Promise<void> Makes the ServiceWorker skip waiting |
|
public |
Starts the ServiceWorker |
|
public |
Returns the ServiceWorkers status Possible status:
|
|
public |
Stops the ServiceWorker |
|
public |
|
|
public |
|
|
public |
async unregister(): Promise<void> Un-registers the ServiceWorker |
|
public |
async updateRegistration(): Promise<void> Updates the ServiceWorker's registrations |
|
public |
|
Private Methods | ||
private |
_bookKeeping(updateHow: CDPServiceWorkerRegistration | CDPServiceWorkerVersion, isVersion: boolean) |
|
private |
|
|
private |
|
Public Constructors
public constructor(manager: WorkerManager) source
Params:
Name | Type | Attribute | Description |
manager | WorkerManager |
Public Methods
public async deliverPushMessage(data: string): Promise<void> source
Delivers a push message to the supplied origin from the ServiceWorker
Params:
Name | Type | Attribute | Description |
data | string | The data of the message |
public status(): string source
Returns the ServiceWorkers status Possible status:
- new
- installing
- installed
- activating
- activated
- redundant
public async stop(versionId: string): Promise<void> source
Stops the ServiceWorker
Params:
Name | Type | Attribute | Description |
versionId | string |
Private Methods
private _bookKeeping(updateHow: CDPServiceWorkerRegistration | CDPServiceWorkerVersion, isVersion: boolean) source
Params:
Name | Type | Attribute | Description |
updateHow | CDPServiceWorkerRegistration | CDPServiceWorkerVersion | ||
isVersion | boolean |
private _destroyed() source
private _errorReported(error: CDPServiceWorkerErrorMessage) source
Params:
Name | Type | Attribute | Description |
error | CDPServiceWorkerErrorMessage |