The PushMessageData interface of the Push API provides methods which let you retrieve the push data sent by a server in various formats.

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

See also:

Methods

arrayBuffer():ArrayBuffer

Extracts the data as an ArrayBuffer object.

Throws:

null

DOMError

blob():Blob

Extracts the data as a Blob object.

Throws:

null

DOMError

json():Dynamic

Extracts the data as a JSON object.

Throws:

null

DOMError

text():String

Extracts the data as a plain text string.