Firefox Tomorrow

web api instance method

PushMessageData: arrayBuffer() method

View on MDN ↗

Secure contextAvailable in workers

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

Syntax

arrayBuffer()

Parameters

None.

Return value

An ArrayBuffer.

Examples

self.addEventListener("push", (event) => {
  const buffer = event.data.arrayBuffer();

  // do something with your array buffer
});

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.