ServiceWorkerRegistration

ServiceWorkerRegistration

package js-html

extends EventTarget

Available on js

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

Documentation ServiceWorkerRegistration by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Variables

read only active:ServiceWorker

Returns a service worker whose state is either activating or activated. This is initially set to null. An active worker will control a ServiceWorkerClient if the client's URL falls within the scope of the registration (the scope option set when ServiceWorkerContainer.register is first called.)

read only installing:ServiceWorker

Returns a service worker whose state is installing. This is initially set to null.

onupdatefound:Function

An EventListener property called whenever an event of type updatefound is fired; it is fired any time the ServiceWorkerRegistration.installing property acquires a new service worker.

read only scope:String

Returns a unique identifier for a service worker registration. This must be on the same origin as the document that registers the ServiceWorker.

read only waiting:ServiceWorker

Returns a service worker whose state is installed. This is initially set to null.

Methods

unregister ():Promise<Bool>

Throws:

null DOMError

update ():Promise<Void>

Throws:

null DOMError

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/ServiceWorkerRegistration.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部