w3c / push-api

Push API
https://w3c.github.io/push-api/
Other
145 stars 40 forks source link

PushMessageData is poorly defined and seems broken #380

Open annevk opened 2 months ago

annevk commented 2 months ago
  1. Most methods refer to a bytes variable that is not defined. Presumably this should be the internal slot that references the associated byte sequence or null?
  2. The methods don't handle bytes being null. Though perhaps it should never be null and that should instead be handled one layer up? It does seem that data on PushEvent is nullable, though data on PushEventInit is not??? That would match how section 10.4 initializes this.
annevk commented 2 months ago

What remains here is making data on PushEventInit nullable (and default to null). That's a normative change that requires changes to implementations, but I think would make sense given the overall desired model.