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. Available only in secure contexts.

MDN Reference

Hierarchy

Properties

controller: ServiceWorker
oncontrollerchange: ((this, ev) => any)

Type declaration

onmessage: ((this, ev) => any)

Type declaration

onmessageerror: ((this, ev) => any)

Type declaration

Methods

  • 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.

    MDN Reference

    Parameters

    Returns boolean