PushMessageData.arrayBuffer()

Experimental

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The arrayBuffer()method of the PushMessageData interface extracts push message data as an ArrayBuffer object.

Syntax

var myArrayBuffer = PushEvent.data.arrayBuffer();

Parameters

None.

Returns

An ArrayBuffer.

Examples

self.addEventListener('push', function(event) {
  var buffer = event.data.arrayBuffer();

  // do something with your array buffer
});

Specifications

Specification Status Comment
Push API
The definition of 'arrayBuffer()' in that specification.
Working Draft Initial definition.

Browser compatibility

BCD tables only load in the browser