← Back to release summary

PushMessageData::bytes()

Category
Capabilities (Fugu)
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
None

Summary

The PushMessageData interface mimics the Body interface, which was amended earlier this year with a new bytes() method, following the principle that APIs should generally vend byte buffers as Uint8Arrays.

Motivation

(Re)align with the `Body` interface by providing the `bytes()` accessor on the `PushMessageData` interface as well. Today this can be done by obtaining the `arrayBuffer()` and then creating a Uint8 view based on it, however a principle was introduced that agreed we should make this the well lit path: https://github.com/w3ctag/design-principles/pull/480

Standards & signals

View on chromestatus.com