Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ServiceWorkerContainer

The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.

Hierarchy

Index

Properties

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

Readonly controller

controller: ServiceWorker | null

oncontrollerchange

oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null

onmessage

onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null

onmessageerror

onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null

Readonly ready

Methods

addEventListener

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    Returns boolean

getRegistration

getRegistrations

register

removeEventListener

startMessages

  • startMessages(): void
  • Returns void

Generated using TypeDoc