Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ServiceWorkerRegistration

This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.

Hierarchy

Index

Properties

EventTarget

EventTarget: { constructor: any; prototype: EventTarget }

Type declaration

Readonly active

active: ServiceWorker | null

Readonly installing

installing: ServiceWorker | null

Readonly navigationPreload

navigationPreload: NavigationPreloadManager

onupdatefound

onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null

Readonly pushManager

pushManager: PushManager

Readonly scope

scope: string

Readonly sync

Readonly updateViaCache

Readonly waiting

waiting: ServiceWorker | null

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

getNotifications

removeEventListener

showNotification

  • Parameters

    Returns Promise<void>

unregister

  • Returns Promise<boolean>

update

  • Returns Promise<void>

Generated using TypeDoc