Liking cljdoc? Tell your friends :D

web.service-workers.PushSubscription

The PushSubscription interface of the Push API provides a subcription's endpoint and allows unsubscription from a push service.

The PushSubscription interface of the Push API provides a subcription's
endpoint and allows unsubscription from a push service.
raw docstring

endpointcljs

(endpoint this)

Property.

[Read Only] [Experimental]

The endpoint read-only property of the web.service-workers.PushSubscription returns a web.USVString containing the endpoint associated the push subscription.

var myEnd = pushSubscription.endpoint;

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

Property.

[Read Only]
[Experimental]

The endpoint read-only property of the `web.service-workers.PushSubscription`
returns a `web.USVString` containing the endpoint associated
the push subscription.

`var myEnd = pushSubscription.endpoint;`

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

expiration-timecljs

(expiration-time this)

Property.

[Read Only] [Experimental]

The expirationTime read-only property of the web.service-workers.PushSubscription returns a web.dom.DOMHighResTimeStamp of the subscription expiration associated with the push subscription, if there is one, or null

var expirationTime = pushSubscription.expirationTime

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

Property.

[Read Only]
[Experimental]

The expirationTime read-only property of the `web.service-workers.PushSubscription`
returns a `web.dom.DOMHighResTimeStamp` of the subscription expiration
associated with the push subscription, if there is one, or null

`var expirationTime = pushSubscription.expirationTime`

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

get-keycljs

(get-key this name)

Method.

[Experimental]

The getKey() method of the web.service-workers.PushSubscription returns an js.ArrayBuffer representing a client public key, can then be sent to a server and used in encrypting push message

​var key = subscription.getKey(name);

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

Method.

[Experimental]

The getKey() method of the `web.service-workers.PushSubscription`
returns an `js.ArrayBuffer` representing a client public key,
can then be sent to a server and used in encrypting push message

`​var key = subscription.getKey(name);`

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

optionscljs

(options this)

Property.

[Read Only] [Experimental]

The options read-only property of the web.service-workers.PushSubscription is an object containing containing the options used to create subscription.

var options = PushSubscription.options

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

Property.

[Read Only]
[Experimental]

The options read-only property of the `web.service-workers.PushSubscription`
is an object containing containing the options used to create
subscription.

`var options = PushSubscription.options`

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

subscription-idcljs

(subscription-id this)

Property.

[Read Only] [Deprecated]

The endpoint read-only property of the web.service-workers.PushSubscription returns a web.DOMString containing the subscription ID associated the push subscription.

var subId = pushSubscription.subscriptionId;

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

Property.

[Read Only]
[Deprecated]

The endpoint read-only property of the `web.service-workers.PushSubscription`
returns a `web.DOMString` containing the subscription ID associated
the push subscription.

`var subId = pushSubscription.subscriptionId;`

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

to-jsoncljs

(to-json this)

Method.

[Experimental]

The toJSON() method of the web.service-workers.PushSubscription is a standard serializer: it returns a JSON representation of subscription properties, providing a useful shortcut.

​mySubscription = subscription.toJSON()

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

Method.

[Experimental]

The toJSON() method of the `web.service-workers.PushSubscription`
is a standard serializer: it returns a JSON representation of
subscription properties, providing a useful shortcut.

`​mySubscription = subscription.toJSON()`

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

unsubscribecljs

(unsubscribe this & args)

Method.

[Experimental]

The unsubscribe() method of the web.service-workers.PushSubscription returns a js.Promise that resolves to a js.Boolean when the subscription is successfully unsubscribed.

​PushSubscription.unsubscribe().then(function(Boolean) { ... });

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

Method.

[Experimental]

The unsubscribe() method of the `web.service-workers.PushSubscription`
returns a `js.Promise` that resolves to a `js.Boolean` when the
subscription is successfully unsubscribed.

`​PushSubscription.unsubscribe().then(function(Boolean) { ... });`

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

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

× close