Re: [push-api] Object values in push messages

On 13 May 2014 08:13, Peter Beverloo <beverloo@google.com> wrote:
> There is a current, not yet implemented proposal to change the type of
> |data| to DOMString. This also allows for cases in which the UA cannot read
> the message's content, which could be the case when encryption is being
> used. JSON data would still be perfectly possible, but it has to be
> deserialized before usage.

That's where I'm going.  But I don't think that's far enough.

> It was discussed to use ArrayBuffers for this purpose, but that makes it
> significantly harder to deal with data in the common case.

This is why I proposed MIME.  ArrayBuffer is pretty unwieldy in the
common case, but a MIME type would allow browsers to identify when an
ArrayBuffer is necessary.  All the other times, a string can be
populated (or application/json parsed if you want to get fancy).

Received on Tuesday, 13 May 2014 16:35:53 UTC