Options
All
  • Public
  • Public/Protected
  • All
Menu

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

  • EventTarget
    • ServiceWorkerRegistration

Index

Properties

EventTarget

EventTarget: object

Type declaration

  • constructor: function
    • new __type(): EventTarget
    • Returns EventTarget

  • prototype: EventTarget

active

active: ServiceWorker | null

installing

installing: ServiceWorker | null

navigationPreload

navigationPreload: NavigationPreloadManager

onupdatefound

onupdatefound: function | 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

    • event: Event

    Returns boolean

getNotifications

removeEventListener

showNotification

  • Parameters

    Returns Promise<void>

unregister

  • unregister(): Promise<boolean>
  • Returns Promise<boolean>

update

  • update(): Promise<void>
  • Returns Promise<void>

Generated using TypeDoc