Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ServiceWorkerRegistration

Package version

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

  • constructor: function
    • Returns EventTarget

  • prototype: EventTarget

active

active: ServiceWorker | null

installing

installing: ServiceWorker | null

navigationPreload

navigationPreload: NavigationPreloadManager

onupdatefound

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

pushManager

pushManager: PushManager

scope

scope: string

sync

updateViaCache

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