New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define a serializer for PushSubscription #125
Comments
SGTM, minus the actual fields, over which I think we need to continue discussion. |
This is of course orthogonal to the actual fields, which is tracked in #56. |
@beverloo Why not just use |
@bzbarsky Even better, thanks for the suggestion! |
As I've proposed in #130, one of the attributes would be an ArrayBuffer, which is not supported in the declarative syntax for serializers. That means we'd need prose for the serializer behaviour (sadly). |
FWIW, I strongly support the proposal to define sensible JSON serialization for subscription - the fact that we no longer do this broke a very reasonable flow, causing me to do:
which is pretty gross imho. |
Given this snippet:
What is
x
meant to be? Today it's"{}"
because attributes on an interface don't get serialized by default. This makes sense for DOM objects, but much less so for POD-like structures like this.Since it's likely that developers will want to send all data to their application server, we should define a serializer for the interface.
I believe we can do this as follows:
The text was updated successfully, but these errors were encountered: