-
Notifications
You must be signed in to change notification settings - Fork 158
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
Allowing something to be the serializer and stringifier #260
Comments
I still think that all serializer options except "serialize all the attributes" should be handled via prose or explicit toJSON functions (which we should allow). The current serializer complexity is ridiculous and not implemented by anyone; allowing people to define toJSON functions would let them handle all this themselves as desired if they want weird serialization behavior, with the one "serialize all the attributes" simple thing for the common case of objects which basically represent a collection of values. |
* Remove all serializers. * Add support for JSON stringification through the toJSON operation. * Add the [Default] extended attribute. * Add a default JSON operation. Fixes whatwg#260. Fixes whatwg#188. Closes https://www.w3.org/Bugs/Public/show_bug.cgi?id=27428.
* Remove all serializers. * Add support for JSON stringification through the toJSON operation. * Add the [Default] extended attribute. * Add a default JSON operation. Fixes whatwg#260. Fixes whatwg#188. Closes https://www.w3.org/Bugs/Public/show_bug.cgi?id=27428.
For whatwg/url#137 we want URL's href attribute to also be the value the serializer returns. However, it's already the stringifier and as far as I can tell the IDL grammar does not allow for both. There's the prose escape-hatch of course, but that seems sad?
The text was updated successfully, but these errors were encountered: