The PushMessageData interface of the Push API provides methods let you retrieve the push data sent by a server in various formats.
The PushMessageData interface of the Push API provides methods let you retrieve the push data sent by a server in various formats.
(array-buffer this)
Method.
The arrayBuffer()method of the web.PushMessageData
interface
push message data as an web.ArrayBuffer
object.
var myArrayBuffer = PushEvent.data.arrayBuffer();
See also: https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/arrayBuffer
Method. The arrayBuffer()method of the `web.PushMessageData` interface push message data as an `web.ArrayBuffer` object. `var myArrayBuffer = PushEvent.data.arrayBuffer();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/arrayBuffer`
(blob this)
Method.
The blob()method of the web.PushMessageData
interface extracts
message data as a web.Blob
object.
var myBlob = PushEvent.data.blob();
See also: https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/blob
Method. The blob()method of the `web.PushMessageData` interface extracts message data as a `web.Blob` object. `var myBlob = PushEvent.data.blob();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/blob`
(json this)
Method.
The json()method of the web.PushMessageData
interface extracts
message data by parsing it as a JSON string and returning the
var myData = PushEvent.data.json();
See also: https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/json
Method. The json()method of the `web.PushMessageData` interface extracts message data by parsing it as a JSON string and returning the `var myData = PushEvent.data.json();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/json`
(text this)
Method.
The text()method of the web.PushMessageData
interface extracts
message data as a plain text string.
var myText = PushEvent.data.text();
See also: https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/text
Method. The text()method of the `web.PushMessageData` interface extracts message data as a plain text string. `var myText = PushEvent.data.text();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/PushMessageData/text`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close