Liking cljdoc? Tell your friends :D
ClojureScript only.

web.workers.PushEvent

The PushEvent interface of the Push API represents a push message has been received. This event is sent to the global scope of web.workers.ServiceWorker. It contains the information sent an application server to a web.service-workers.PushSubscription.

The PushEvent interface of the Push API represents a push message
has been received. This event is sent to the global scope of
`web.workers.ServiceWorker`. It contains the information sent
an application server to a `web.service-workers.PushSubscription`.
raw docstring

constructorcljs

(constructor & args)

Constructor.

The PushEvent() constructor creates a new web.workers.PushEvent object. Note that the this constructor is exposed only to a service worker context.

type \tA web.DOMString defining the type of PushEvent. This can be push or pushsubscriptionchange. \teventInitDict Optional \tAn options object containing any initialization data you want to populate the PushEvent object with. The options are:

\t\tdata: The data you want the PushEvent to contain, if any. When the constructor is invoked, the PushEvent.data property of the resulting object will be set to a new web.service-workers.PushMessageData object containing bytes extracted from the eventInitDict data member.

See also: https://developer.mozilla.org/en-US/docs/Web/API/PushEvent/PushEvent

Constructor.

The PushEvent() constructor creates a new `web.workers.PushEvent` object. Note that the this constructor is exposed only to a service worker context.

type
\tA `web.DOMString` defining the type of PushEvent. This can be push or pushsubscriptionchange.
\teventInitDict Optional
\tAn options object containing any initialization data you want to populate the PushEvent object with. The options are:

\t\tdata: The data you want the PushEvent to contain, if any. When the constructor is invoked, the `PushEvent.data` property of the resulting object will be set to a new `web.service-workers.PushMessageData` object containing bytes extracted from the eventInitDict data member.

See also: `https://developer.mozilla.org/en-US/docs/Web/API/PushEvent/PushEvent`
sourceraw docstring

datacljs

(data this)

Property.

[Read Only] [Experimental]

The data read-only property of the PushEvent interface returns reference to a web.service-workers.PushMessageData object containing sent to the web.service-workers.PushSubscription.

var myPushData = PushEvent.data;

See also: https://developer.mozilla.org/en-US/docs/Web/API/PushEvent/data

Property.

[Read Only]
[Experimental]

The data read-only property of the PushEvent interface returns
reference to a `web.service-workers.PushMessageData` object containing
sent to the `web.service-workers.PushSubscription`.

`var myPushData = PushEvent.data;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/PushEvent/data`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close