- From: Kit Cambridge <notifications@github.com>
- Date: Thu, 20 Aug 2015 22:45:38 -0700
- To: w3c/push-api <push-api@noreply.github.com>
Received on Friday, 21 August 2015 05:46:27 UTC
> If you get a string it should only be from utf-8 bytes. (Bytes decoded as utf-8, with replacement as error handling mode.) Should we decode when creating the `PushMessageData` object, though, or only when `text()` is called? I'm guessing the latter, since we expose `blob()` and `arrayBuffer()`, and UTF-8 decoding will garble binary messages. Section 11.1 seems to imply this: > * Let `event` be a new `PushEvent`, whose data attribute is a new `PushMessageData` with `bytes` set to the binary message data received by the user agent in the push message, or an empty byte sequence if no data was received. So `bytes` is a byte sequence, but `PushMessageDataInit` is a `USVString`. Would it make sense to have something like this instead? ```webidl typedef sequence<octet> PushMessageDataInit; ``` --- Reply to this email directly or view it on GitHub: https://github.com/w3c/push-api/issues/159#issuecomment-133295530
Received on Friday, 21 August 2015 05:46:27 UTC