Skip to content

Module: web::ServiceWorker

Jovan Gerodetti edited this page Apr 14, 2021 · 2 revisions

ServiceWorker

exported: default
kind: object
declaration: const

The current service worker of the site

Properties

script

Type: string
kind: value

scope

Type: (boolean|string)
kind: value

  • true: the scope is extracted from the mainfest file - false: the ServiceWorker is registered without a scope - string: the string is applied as scope defaults to true

isSupported

kind: value

PushManager

Type: PushManager
kind: value

NotificationManager

Type: NotificationManager
kind: value

__proto__

Type: ServiceWorkerEventTarget
kind: value

Methods

init() => {Promise}

kind: function

initialize the service worker. If no ServiceWorker is registered yet, it will be during the initialization.

checkUpdate() => {Promise}

kind: function

check if there is a pending service worker update that can be installed

remove() => {Promise}

kind: function

unregisters the service worker from the browser.

consume(object) => {undefined}

kind: function

consumes an application object. By consuming the application all events of both the service worker and the application are shared between the two. This allows independent applications (i.e. in seperated tabs) to operate as one.

Name Type Description
object ApplicationTrait
Clone this wiki locally